From 9028e0682f334696405a95ea33b5680d8e46a9d0 Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Sun, 12 Feb 2023 10:53:14 +0100 Subject: Remove 23.4 and 24.5 patchsets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ulrich Müller --- emacs/23.4/02_all_gameuser.patch | 17 - emacs/23.4/04_all_ns-appdirs.patch | 50 -- emacs/23.4/09_all_xgselect-infloop.patch | 15 - emacs/23.4/10_all_paxctl.patch | 67 --- emacs/23.4/11_all_x32.patch | 38 -- emacs/23.4/12_all_freebsd.patch | 17 - emacs/23.4/13_all_local-eval.patch | 28 - emacs/23.4/14_all_ncurses-tinfo.patch | 31 - emacs/23.4/15_all_pax-xattr.patch | 46 -- emacs/23.4/16_all_gnus-fun-tmpfile.patch | 41 -- emacs/23.4/17_all_find-gc-tmpfile.patch | 135 ----- emacs/23.4/18_all_browse-url-tmpfile.patch | 59 -- emacs/23.4/19_all_tramp-tmpfile.patch | 84 --- emacs/23.4/20_all_xz.patch | 323 ---------- emacs/23.4/21_all_format-security.patch | 14 - emacs/23.4/22_all_glibc-2.20.patch | 15 - emacs/23.4/23_all_games-sgid.patch | 265 --------- emacs/23.4/24_all_browse-url-firefox.patch | 105 ---- emacs/23.4/25_all_jpeg-version.patch | 25 - emacs/23.4/26_all_giflib-5.patch | 150 ----- emacs/23.4/27_all_conftest-doug-lea.patch | 46 -- emacs/23.4/28_all_gmalloc.patch | 65 -- emacs/23.4/29_all_enriched-mode.patch | 79 --- emacs/23.4/30_all_glibc-2.28.patch | 15 - emacs/23.4/31_all_dso-handle.patch | 13 - emacs/24.5/04_all_games-sgid.patch | 259 -------- emacs/24.5/06_all_gtk-toolbar.patch | 922 ----------------------------- emacs/24.5/07_all_gmalloc.patch | 81 --- emacs/24.5/08_all_enriched-mode.patch | 78 --- emacs/24.5/09_all_imagemagick-7.patch | 101 ---- 30 files changed, 3184 deletions(-) delete mode 100644 emacs/23.4/02_all_gameuser.patch delete mode 100644 emacs/23.4/04_all_ns-appdirs.patch delete mode 100644 emacs/23.4/09_all_xgselect-infloop.patch delete mode 100644 emacs/23.4/10_all_paxctl.patch delete mode 100644 emacs/23.4/11_all_x32.patch delete mode 100644 emacs/23.4/12_all_freebsd.patch delete mode 100644 emacs/23.4/13_all_local-eval.patch delete mode 100644 emacs/23.4/14_all_ncurses-tinfo.patch delete mode 100644 emacs/23.4/15_all_pax-xattr.patch delete mode 100644 emacs/23.4/16_all_gnus-fun-tmpfile.patch delete mode 100644 emacs/23.4/17_all_find-gc-tmpfile.patch delete mode 100644 emacs/23.4/18_all_browse-url-tmpfile.patch delete mode 100644 emacs/23.4/19_all_tramp-tmpfile.patch delete mode 100644 emacs/23.4/20_all_xz.patch delete mode 100644 emacs/23.4/21_all_format-security.patch delete mode 100644 emacs/23.4/22_all_glibc-2.20.patch delete mode 100644 emacs/23.4/23_all_games-sgid.patch delete mode 100644 emacs/23.4/24_all_browse-url-firefox.patch delete mode 100644 emacs/23.4/25_all_jpeg-version.patch delete mode 100644 emacs/23.4/26_all_giflib-5.patch delete mode 100644 emacs/23.4/27_all_conftest-doug-lea.patch delete mode 100644 emacs/23.4/28_all_gmalloc.patch delete mode 100644 emacs/23.4/29_all_enriched-mode.patch delete mode 100644 emacs/23.4/30_all_glibc-2.28.patch delete mode 100644 emacs/23.4/31_all_dso-handle.patch delete mode 100644 emacs/24.5/04_all_games-sgid.patch delete mode 100644 emacs/24.5/06_all_gtk-toolbar.patch delete mode 100644 emacs/24.5/07_all_gmalloc.patch delete mode 100644 emacs/24.5/08_all_enriched-mode.patch delete mode 100644 emacs/24.5/09_all_imagemagick-7.patch diff --git a/emacs/23.4/02_all_gameuser.patch b/emacs/23.4/02_all_gameuser.patch deleted file mode 100644 index 8e061a0..0000000 --- a/emacs/23.4/02_all_gameuser.patch +++ /dev/null @@ -1,17 +0,0 @@ -http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7717 - ---- emacs-23.2-orig/configure.in -+++ emacs-23.2/configure.in -@@ -175,6 +175,12 @@ - This option is only used on x86-64 and s390x GNU/Linux architectures.])]) - CRT_DIR="${with_crt_dir}" - -+AC_ARG_WITH(gameuser,dnl -+[AS_HELP_STRING([--with-gameuser=USER],[user for shared game score files])]) -+test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ -+ && gameuser="${with_gameuser}" -+test "X$gameuser" = X && gameuser=games -+ - AC_ARG_WITH([gnustep-conf],dnl - [AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])]) - test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ diff --git a/emacs/23.4/04_all_ns-appdirs.patch b/emacs/23.4/04_all_ns-appdirs.patch deleted file mode 100644 index 07113ff..0000000 --- a/emacs/23.4/04_all_ns-appdirs.patch +++ /dev/null @@ -1,50 +0,0 @@ -http://bugs.gentoo.org/268793 - ---- emacs-23.2-orig/configure.in -+++ emacs-23.2/configure.in -@@ -1417,10 +1417,10 @@ - window_system=nextstep - with_xft=no - # set up packaging dirs -- exec_prefix=${ns_appbindir} -- libexecdir=${ns_appbindir}/libexec - if test "${EN_NS_SELF_CONTAINED}" = yes; then - prefix=${ns_appresdir} -+ exec_prefix=${ns_appbindir} -+ libexecdir=${ns_appbindir}/libexec - fi - fi - CFLAGS="$tmp_CFLAGS" ---- emacs-23.2-orig/leim/Makefile.in -+++ emacs-23.2/leim/Makefile.in -@@ -263,11 +263,6 @@ - [ -n "$${installuser}" ] && break ; \ - done ; \ - find ${INSTALLDIR} -exec chown $${installuser} '{}' ';' -- if [ "${ns_appresdir}" != "" ]; then \ -- ( cd ${ns_appresdir} ; \ -- if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\ -- rm -fr share ) ; \ -- else true ; fi - - clean mostlyclean: - rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \ ---- emacs-23.2-orig/Makefile.in -+++ emacs-23.2/Makefile.in -@@ -424,16 +424,6 @@ - ${INSTALL_DATA} lib-src/$$f $(DESTDIR)${archlibdir}/$$f; \ - else true; fi ; \ - done -- if test "${ns_appdir}" != ""; then \ -- ( cd ${ns_appresdir} ; \ -- if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\ -- if test -d share/info ; then dir=share/info; $(MV_DIRS) ; fi ; \ -- rm -fr share ) ; \ -- ( cd ${ns_appbindir}/libexec ; dir=emacs/*/*/* ; $(MV_DIRS); \ -- rm -fr emacs ) ; \ -- ( cd ${ns_appbindir}/bin ; rm -f emacs emacs-23* ; \ -- ln -sf ../libexec/* .) ; \ -- else true ; fi - - ## http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01672.html - ## Needs to be the user running install, so configure can't set it. diff --git a/emacs/23.4/09_all_xgselect-infloop.patch b/emacs/23.4/09_all_xgselect-infloop.patch deleted file mode 100644 index 89c4dcd..0000000 --- a/emacs/23.4/09_all_xgselect-infloop.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9754 -https://bugs.gentoo.org/401199 -Fix infinite loop in xg_select() with glib >= 2.31. - ---- emacs-23.4-orig/src/xgselect.c -+++ emacs-23.4/src/xgselect.c -@@ -55,6 +55,8 @@ xg_select (max_fds, rfds, wfds, efds, ti - do { - if (n_gfds > gfds_size) - { -+ if (gfds_size == 0) -+ gfds_size = 128; - while (n_gfds > gfds_size) - gfds_size *= 2; - xfree (gfds); diff --git a/emacs/23.4/10_all_paxctl.patch b/emacs/23.4/10_all_paxctl.patch deleted file mode 100644 index d323c76..0000000 --- a/emacs/23.4/10_all_paxctl.patch +++ /dev/null @@ -1,67 +0,0 @@ -On grsecurity/PaX systems, unexec will fail due to a gap between -the bss section and the heap. This can be prevented by disabling -memory randomization in temacs with "paxctl -r". -https://bugs.gentoo.org/411439 -https://bugs.gentoo.org/426394 -http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11398 - ---- emacs-23.4-orig/configure.in -+++ emacs-23.4/configure.in -@@ -801,6 +801,16 @@ - dnl Don't use GZIP, which is used by gzip for additional parameters. - AC_PATH_PROG(GZIP_PROG, gzip) - -+if test $opsys = gnu-linux; then -+ AC_PATH_PROG(PAXCTL, paxctl,, -+ [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) -+ if test "X$PAXCTL" != X; then -+ AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header]) -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], -+ [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then AC_MSG_RESULT(yes) -+ else AC_MSG_RESULT(no); PAXCTL=""; fi]) -+ fi -+fi - - ## Need makeinfo >= 4.6 (?) to build the manuals. - AC_PATH_PROG(MAKEINFO, makeinfo, no) ---- emacs-23.4-orig/src/Makefile.in -+++ emacs-23.4/src/Makefile.in -@@ -508,6 +508,12 @@ - some cpps. */ - TEMACS_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE LD_SWITCH_MACHINE_TEMACS - -+/* If available, the full path to the paxctl program. -+ On grsecurity/PaX systems, unexec will fail due to a gap between -+ the bss section and the heap. This can be prevented by disabling -+ memory randomization in temacs with "paxctl -r". See bug#11398. */ -+PAXCTL = @PAXCTL@ -+ - /* A macro which other sections of Makefile can redefine to munge the - flags before they are passed to LD. This is helpful if you have - redefined LD to something odd, like "gcc". -@@ -933,6 +939,7 @@ - -EMACSLOADPATH=${lispsource} ./emacs -q -batch -f list-load-path-shadows - #else - LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump -+ test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT) - @: This new Emacs is as functional and more efficient then - @: bootstrap-emacs, so let us replace it. - -ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT} -@@ -974,6 +981,9 @@ - -o temacs ${STARTFILES} ${obj} ${otherobj} \ - ${LIBES} - #endif -+#ifndef CANNOT_DUMP -+ test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT) -+#endif - - /* We do not use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE - often contain options that have to do with using Emacs''s crt0, -@@ -1419,6 +1429,7 @@ - ln -f temacs${EXEEXT} bootstrap-emacs${EXEEXT} - #else - $(RUN_TEMACS) --batch --load loadup bootstrap -+ test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT) - mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT} - #endif /* ! defined (CANNOT_DUMP) */ - @: Compile some files earlier to speed up further compilation. diff --git a/emacs/23.4/11_all_x32.patch b/emacs/23.4/11_all_x32.patch deleted file mode 100644 index fc05980..0000000 --- a/emacs/23.4/11_all_x32.patch +++ /dev/null @@ -1,38 +0,0 @@ -Fix compilation with ABI=x32. -https://bugs.gentoo.org/420257 - ---- emacs-23.4-orig/lib-src/fakemail.c -+++ emacs-23.4/lib-src/fakemail.c -@@ -363,7 +363,7 @@ - make_file_preface () - { - char *the_string, *temp; -- long idiotic_interface; -+ time_t idiotic_interface; - struct tm *tm; - long prefix_length; - long user_length; ---- emacs-23.4-orig/src/m/amdx86-64.h -+++ emacs-23.4/src/m/amdx86-64.h -@@ -30,8 +30,10 @@ - operating system this machine is likely to run. - USUAL-OPSYS="linux" */ - -+#ifndef __ILP32__ /* Don't define for x32 ABI. */ - #define BITS_PER_LONG 64 - #define BITS_PER_EMACS_INT 64 -+#endif - - /* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word - is the most significant byte. */ -@@ -50,8 +52,10 @@ - /* __x86_64 defined automatically. */ - - /* Define the type to use. */ -+#ifndef __ILP32__ - #define EMACS_INT long - #define EMACS_UINT unsigned long -+#endif - - /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend - the 24-bit bit field into an int. In other words, if bit fields diff --git a/emacs/23.4/12_all_freebsd.patch b/emacs/23.4/12_all_freebsd.patch deleted file mode 100644 index 82b09d2..0000000 --- a/emacs/23.4/12_all_freebsd.patch +++ /dev/null @@ -1,17 +0,0 @@ -Fix linking on FreeBSD. -http://debbugs.gnu.org/12047 - ---- emacs-23.4-orig/src/s/freebsd.h -+++ emacs-23.4/src/s/freebsd.h -@@ -76,9 +76,9 @@ - there, contrary to what a stock GCC would do. */ - - #define LD_SWITCH_SYSTEM -L/usr/local/lib --#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -+#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o - #define UNEXEC unexelf.o --#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o -+#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o - #undef LIB_GCC - #define LIB_GCC - diff --git a/emacs/23.4/13_all_local-eval.patch b/emacs/23.4/13_all_local-eval.patch deleted file mode 100644 index 3753132..0000000 --- a/emacs/23.4/13_all_local-eval.patch +++ /dev/null @@ -1,28 +0,0 @@ -Fix security flaw in enable-local-eval. -http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00396.html -https://bugs.gentoo.org/431178 - ---- emacs-23.4-orig/lisp/files.el -+++ emacs-23.4/lisp/files.el -@@ -2986,11 +2986,16 @@ - ;; Obey `enable-local-eval'. - ((eq var 'eval) - (when enable-local-eval -- (push elt all-vars) -- (or (eq enable-local-eval t) -- (hack-one-local-variable-eval-safep (eval (quote val))) -- (safe-local-variable-p var val) -- (push elt unsafe-vars)))) -+ (let ((safe (or (hack-one-local-variable-eval-safep -+ (eval (quote val))) -+ ;; In case previously marked safe (bug#5636). -+ (safe-local-variable-p var val)))) -+ ;; If not safe and e-l-v = :safe, ignore totally. -+ (when (or safe (not (eq enable-local-variables :safe))) -+ (push elt all-vars) -+ (or (eq enable-local-eval t) -+ safe -+ (push elt unsafe-vars)))))) - ;; Ignore duplicates (except `mode') in the present list. - ((and (assq var all-vars) (not (eq var 'mode))) nil) - ;; Accept known-safe variables. diff --git a/emacs/23.4/14_all_ncurses-tinfo.patch b/emacs/23.4/14_all_ncurses-tinfo.patch deleted file mode 100644 index 7cd6165..0000000 --- a/emacs/23.4/14_all_ncurses-tinfo.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fix runtime failure if built with separate tinfo library. -https://bugs.gentoo.org/459458 - ---- emacs-23.4-orig/configure.in -+++ emacs-23.4/configure.in -@@ -2391,7 +2391,13 @@ - # That is because we have not set up to link ncurses in lib-src. - # It's better to believe a function is not available - # than to expect to find it in ncurses. --AC_CHECK_LIB(ncurses, tparm) -+AC_SEARCH_LIBS(tparm, [ncurses tinfo], -+ [AC_DEFINE(HAVE_LIBNCURSES, 1, -+ [Define to 1 if you have the ncurses or tinfo library.])]) -+if test "$ac_cv_search_tparm" = "-ltinfo"; then -+ LIBS_TINFO="-ltinfo" -+fi -+AC_SUBST(LIBS_TINFO) - - case "$opsys" in - netbsd) ---- emacs-23.4-orig/src/Makefile.in -+++ emacs-23.4/src/Makefile.in -@@ -919,7 +919,7 @@ - with GCC, we might need gnulib again after them. */ - - LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \ -- LIBGPM LIBRESOLV LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \ -+ LIBGPM LIBRESOLV LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP @LIBS_TINFO@ \ - LIBS_DEBUG $(GETLOADAVG_LIBS) ${GCONF_LIBS} \ - @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \ - $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR) diff --git a/emacs/23.4/15_all_pax-xattr.patch b/emacs/23.4/15_all_pax-xattr.patch deleted file mode 100644 index 040dacf..0000000 --- a/emacs/23.4/15_all_pax-xattr.patch +++ /dev/null @@ -1,46 +0,0 @@ -Fix failure in unexec with hardened Linux kernel and XATTR_PAX_FLAGS=y. -https://bugs.gentoo.org/456970 -https://bugs.gentoo.org/497498 - ---- emacs-23.4-orig/configure.in -+++ emacs-23.4/configure.in -@@ -812,6 +812,18 @@ - fi - fi - -+AC_PATH_PROG(SETFATTR, setfattr) -+if test "X$SETFATTR" != X; then -+ AC_MSG_CHECKING([whether extended attributes are supported]) -+ touch conftest.tmp -+ if $SETFATTR -n user.pax.flags conftest.tmp >/dev/null 2>&1; then -+ AC_MSG_RESULT(yes) -+ else -+ AC_MSG_RESULT(no); SETFATTR="" -+ fi -+ rm -f conftest.tmp -+fi -+ - ## Need makeinfo >= 4.6 (?) to build the manuals. - AC_PATH_PROG(MAKEINFO, makeinfo, no) - dnl By this stage, configure has already checked for egrep and set EGREP, ---- emacs-23.4-orig/src/Makefile.in -+++ emacs-23.4/src/Makefile.in -@@ -514,6 +514,9 @@ - memory randomization in temacs with "paxctl -r". See bug#11398. */ - PAXCTL = @PAXCTL@ - -+/* If available, the full path to the setfattr program. */ -+SETFATTR = @SETFATTR@ -+ - /* A macro which other sections of Makefile can redefine to munge the - flags before they are passed to LD. This is helpful if you have - redefined LD to something odd, like "gcc". -@@ -983,6 +986,8 @@ - #endif - #ifndef CANNOT_DUMP - test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT) -+ test "X$(SETFATTR)" = X \ -+ || $(SETFATTR) -n user.pax.flags -v er temacs$(EXEEXT) - #endif - - /* We do not use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE diff --git a/emacs/23.4/16_all_gnus-fun-tmpfile.patch b/emacs/23.4/16_all_gnus-fun-tmpfile.patch deleted file mode 100644 index 18adf49..0000000 --- a/emacs/23.4/16_all_gnus-fun-tmpfile.patch +++ /dev/null @@ -1,41 +0,0 @@ -Fix insecure use of temporary files. -Patch from upstream bzr, backported to Emacs 23.4. -https://bugs.gentoo.org/509830 -CVE-2014-3421 - -revno: 117066 -fixes bug: http://bugs.debian.org/747100 -committer: Glenn Morris -branch nick: emacs-24 -timestamp: Mon 2014-05-05 20:50:51 -0700 -message: - * gnus-fun.el (gnus-grab-cam-face): Do not use predictable temp-file name. - ---- emacs-23.4-orig/lisp/gnus/gnus-fun.el -+++ emacs-23.4/lisp/gnus/gnus-fun.el -@@ -260,20 +260,21 @@ - (interactive) - (shell-command "xawtv-remote snap ppm") - (let ((file nil) -+ (tempfile (make-temp-file "gnus-face-" nil ".ppm")) - result) - (while (null (setq file (directory-files "/tftpboot/sparky/tmp" - t "snap.*ppm"))) - (sleep-for 1)) - (setq file (car file)) - (shell-command -- (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | pnmscale -width 48 -height 48 | ppmtopgm > /tmp/gnus.face.ppm" -- file)) -+ (format "pnmcut -left 110 -top 30 -width 144 -height 144 '%s' | pnmscale -width 48 -height 48 | ppmtopgm >> %s" -+ file tempfile)) - (let ((gnus-convert-image-to-face-command - (format "cat '%%s' | ppmquant %%d | ppmchange %s | pnmtopng" - (gnus-fun-ppm-change-string)))) -- (setq result (gnus-face-from-file "/tmp/gnus.face.ppm"))) -+ (setq result (gnus-face-from-file tempfile))) - (delete-file file) -- ;;(delete-file "/tmp/gnus.face.ppm") -+ ;;(delete-file tempfile) ; FIXME why are we not deleting it?! - result)) - - (defun gnus-fun-ppm-change-string () diff --git a/emacs/23.4/17_all_find-gc-tmpfile.patch b/emacs/23.4/17_all_find-gc-tmpfile.patch deleted file mode 100644 index 3a7a719..0000000 --- a/emacs/23.4/17_all_find-gc-tmpfile.patch +++ /dev/null @@ -1,135 +0,0 @@ -Fix insecure use of temporary files. -Patch from upstream bzr, backported to Emacs 23.4. -https://bugs.gentoo.org/509830 -CVE-2014-3422 - -revno: 117067 -fixes bug: http://bugs.debian.org/747100 -committer: Glenn Morris -branch nick: emacs-24 -timestamp: Mon 2014-05-05 20:53:31 -0700 -message: - find-gc.el misc fixes - - The whole file looks obsolete and/or broken. - - * lisp/emacs-lisp/find-gc.el (find-gc-source-directory): Give it a value. - (find-gc-source-files): Update some names. - (trace-call-tree): Simplify and update. Avoid predictable temp-file names. - ---- emacs-23.4-orig/lisp/emacs-lisp/find-gc.el -+++ emacs-23.4/lisp/emacs-lisp/find-gc.el -@@ -24,14 +24,15 @@ - - ;; Produce in find-gc-unsafe-list the set of all functions that may invoke GC. - ;; This expects the Emacs sources to live in find-gc-source-directory. --;; It creates a temporary working directory /tmp/esrc. - - ;;; Code: - - (defvar find-gc-unsafe-list nil - "The list of unsafe functions is placed here by `find-gc-unsafe'.") - --(defvar find-gc-source-directory) -+(defvar find-gc-source-directory -+ (file-name-as-directory (expand-file-name "src" source-directory)) -+ "Directory containing Emacs C sources.") - - (defvar find-gc-subrs-callers nil - "Alist of users of subrs, from GC testing. -@@ -60,14 +61,14 @@ - "indent.c" "search.c" "regex.c" "undo.c" - "alloc.c" "data.c" "doc.c" "editfns.c" - "callint.c" "eval.c" "fns.c" "print.c" "lread.c" -- "abbrev.c" "syntax.c" "unexec.c" -+ "syntax.c" "unexec.c" - "bytecode.c" "process.c" "callproc.c" "doprnt.c" -- "x11term.c" "x11fns.c")) -+ "xterm.c" "xfns.c")) - - - (defun find-gc-unsafe () - "Return a list of unsafe functions--that is, which can call GC. --Also store it in `find-gc-unsafe'." -+Also store it in `find-gc-unsafe-list'." - (trace-call-tree nil) - (trace-use-tree) - (find-unsafe-funcs 'Fgarbage_collect) -@@ -103,47 +104,38 @@ - - - --(defun trace-call-tree (&optional already-setup) -+(defun trace-call-tree (&optional ignored) - (message "Setting up directories...") -- (or already-setup -- (progn -- ;; Gee, wouldn't a built-in "system" function be handy here. -- (call-process "csh" nil nil nil "-c" "rm -rf /tmp/esrc") -- (call-process "csh" nil nil nil "-c" "mkdir /tmp/esrc") -- (call-process "csh" nil nil nil "-c" -- (format "ln -s %s/*.[ch] /tmp/esrc" -- find-gc-source-directory)))) -- (with-current-buffer (get-buffer-create "*Trace Call Tree*") -- (setq find-gc-subrs-called nil) -- (let ((case-fold-search nil) -- (files find-gc-source-files) -- name entry) -- (while files -- (message "Compiling %s..." (car files)) -- (call-process "csh" nil nil nil "-c" -- (format "gcc -dr -c /tmp/esrc/%s -o /dev/null" -- (car files))) -- (erase-buffer) -- (insert-file-contents (concat "/tmp/esrc/" (car files) ".rtl")) -- (while (re-search-forward ";; Function \\|(call_insn " nil t) -- (if (= (char-after (- (point) 3)) ?o) -- (progn -- (looking-at "[a-zA-Z0-9_]+") -- (setq name (intern (buffer-substring (match-beginning 0) -- (match-end 0)))) -- (message "%s : %s" (car files) name) -- (setq entry (list name) -- find-gc-subrs-called (cons entry find-gc-subrs-called))) -- (if (looking-at ".*\n?.*\"\\([A-Za-z0-9_]+\\)\"") -+ (setq find-gc-subrs-called nil) -+ (let ((case-fold-search nil) -+ (default-directory find-gc-source-directory) -+ (files find-gc-source-files) -+ name entry rtlfile) -+ (dolist (file files) -+ (message "Compiling %s..." file) -+ (call-process "gcc" nil nil nil "-I" "." "-I" "../lib" -+ "-fdump-rtl-expand" "-o" null-device "-c" file) -+ (setq rtlfile -+ (file-expand-wildcards (format "%s.*.expand" file) t)) -+ (if (/= 1 (length rtlfile)) -+ (message "Error compiling `%s'?" file) -+ (with-temp-buffer -+ (insert-file-contents (setq rtlfile (car rtlfile))) -+ (delete-file rtlfile) -+ (while (re-search-forward ";; Function \\|(call_insn " nil t) -+ (if (= (char-after (- (point) 3)) ?o) - (progn -- (setq name (intern (buffer-substring (match-beginning 1) -- (match-end 1)))) -- (or (memq name (cdr entry)) -- (setcdr entry (cons name (cdr entry)))))))) -- (delete-file (concat "/tmp/esrc/" (car files) ".rtl")) -- (setq files (cdr files))))) --) -- -+ (looking-at "[a-zA-Z0-9_]+") -+ (setq name (intern (match-string 0))) -+ (message "%s : %s" (car files) name) -+ (setq entry (list name) -+ find-gc-subrs-called -+ (cons entry find-gc-subrs-called))) -+ (if (looking-at ".*\n?.*\"\\([A-Za-z0-9_]+\\)\"") -+ (progn -+ (setq name (intern (match-string 1))) -+ (or (memq name (cdr entry)) -+ (setcdr entry (cons name (cdr entry))))))))))))) - - (defun trace-use-tree () - (setq find-gc-subrs-callers (mapcar 'list (mapcar 'car find-gc-subrs-called))) diff --git a/emacs/23.4/18_all_browse-url-tmpfile.patch b/emacs/23.4/18_all_browse-url-tmpfile.patch deleted file mode 100644 index ea62328..0000000 --- a/emacs/23.4/18_all_browse-url-tmpfile.patch +++ /dev/null @@ -1,59 +0,0 @@ -Fix insecure use of temporary files. -Patch from upstream bzr, backported to Emacs 23.4. -https://bugs.gentoo.org/509830 -CVE-2014-3423 - -revno: 117087 -fixes bug: http://debbugs.gnu.org/17428 -committer: Glenn Morris -branch nick: emacs-24 -timestamp: Thu 2014-05-08 14:10:36 -0400 -message: - * browse-url.el (browse-url-mosaic): Be careful when writing /tmp/Mosaic.PID. - ---- emacs-23.4-orig/lisp/net/browse-url.el -+++ emacs-23.4/lisp/net/browse-url.el -@@ -1234,28 +1234,26 @@ - (let ((pidfile (expand-file-name browse-url-mosaic-pidfile)) - pid) - (if (file-readable-p pidfile) -- (save-excursion -- (find-file pidfile) -- (goto-char (point-min)) -- (setq pid (read (current-buffer))) -- (kill-buffer nil))) -- (if (and pid (zerop (signal-process pid 0))) ; Mosaic running -- (save-excursion -- (find-file (format "/tmp/Mosaic.%d" pid)) -- (erase-buffer) -- (insert (if (browse-url-maybe-new-window new-window) -- "newwin\n" -- "goto\n") -- url "\n") -- (save-buffer) -- (kill-buffer nil) -+ (with-temp-buffer -+ (insert-file-contents pidfile) -+ (setq pid (read (current-buffer))))) -+ (if (and (integerp pid) (zerop (signal-process pid 0))) ; Mosaic running -+ (progn -+ (with-temp-buffer -+ (insert (if (browse-url-maybe-new-window new-window) -+ "newwin\n" -+ "goto\n") -+ url "\n") -+ (if (file-exists-p (setq pidfile (format "/tmp/Mosaic.%d" pid))) -+ (delete-file pidfile)) -+ ;; http://debbugs.gnu.org/17428. Use O_EXCL. -+ (write-region nil nil pidfile nil 'silent nil 'excl)) - ;; Send signal SIGUSR to Mosaic - (message "Signaling Mosaic...") - (signal-process pid 'SIGUSR1) - ;; Or you could try: - ;; (call-process "kill" nil 0 nil "-USR1" (int-to-string pid)) -- (message "Signaling Mosaic...done") -- ) -+ (message "Signaling Mosaic...done")) - ;; Mosaic not running - start it - (message "Starting %s..." browse-url-mosaic-program) - (apply 'start-process "xmosaic" nil browse-url-mosaic-program diff --git a/emacs/23.4/19_all_tramp-tmpfile.patch b/emacs/23.4/19_all_tramp-tmpfile.patch deleted file mode 100644 index 9eda3f9..0000000 --- a/emacs/23.4/19_all_tramp-tmpfile.patch +++ /dev/null @@ -1,84 +0,0 @@ -Fix insecure use of temporary files. -Patch from upstream bzr, backported to Emacs 23.4. -https://bugs.gentoo.org/509830 -CVE-2014-3424 - -revno: 117071 -committer: Michael Albinus -branch nick: emacs-24 -timestamp: Tue 2014-05-06 11:51:05 +0200 -message: - Fix Bug#17415. - - * net/tramp-sh.el (tramp-uudecode): Replace the hard-coded temporary - file name by a format specifier. - (tramp-remote-coding-commands): Enhance docstring. - (tramp-find-inline-encoding): Replace "%t" by a temporary file name. - ---- emacs-23.4-orig/lisp/net/tramp.el -+++ emacs-23.4/lisp/net/tramp.el -@@ -1687,9 +1687,9 @@ - "Remote host for this *tramp* buffer.") - - (defconst tramp-uudecode -- "(echo begin 600 /tmp/tramp.$$; tail +2) | uudecode --cat /tmp/tramp.$$ --rm -f /tmp/tramp.$$" -+ "(echo begin 600 %t; tail -n +2) | uudecode -+cat %t -+rm -f %t" - "Shell function to implement `uudecode' to standard output. - Many systems support `uudecode -o /dev/stdout' or `uudecode -o -' - for this or `uudecode -p', but some systems don't, and for them -@@ -7173,7 +7173,7 @@ - - \(FORMAT ENCODING DECODING\) - --FORMAT is symbol describing the encoding/decoding format. It can be -+FORMAT is a symbol describing the encoding/decoding format. It can be - `b64' for base64 encoding, `uu' for uu encoding, or `pack' for simple packing. - - ENCODING and DECODING can be strings, giving commands, or symbols, -@@ -7220,9 +7220,11 @@ - specifier is not present, the input should be read from standard - input. - --If they are variables, this variable is a string containing a Perl --implementation for this functionality. This Perl program will be transferred --to the remote host, and it is available as shell function with the same name.") -+If they are variables, this variable is a string containing a -+Perl or Shell implementation for this functionality. This -+program will be transferred to the remote host, and it is -+available as shell function with the same name. A \"%t\" format -+specifier in the variable value denotes a temporary file.") - - (defun tramp-find-inline-encoding (vec) - "Find an inline transfer encoding that works. -@@ -7286,10 +7288,25 @@ - (throw 'wont-work-remote nil)) - - (when (not (stringp rem-dec)) -- (let ((name (symbol-name rem-dec))) -+ (let ((name (symbol-name rem-dec)) -+ (value (symbol-value rem-dec)) -+ tmpfile) - (while (string-match (regexp-quote "-") name) - (setq name (replace-match "_" nil t name))) -- (tramp-maybe-send-script vec (symbol-value rem-dec) name) -+ (when (string-match "%t" value) -+ (setq tmpfile -+ (make-temp-name -+ (expand-file-name -+ tramp-temp-name-prefix -+ (tramp-get-remote-tmpdir vec))) -+ value -+ (format-spec -+ value -+ (format-spec-make -+ ?t -+ (tramp-file-name-handler -+ 'file-remote-p tmpfile 'localname))))) -+ (tramp-maybe-send-script vec value name) - (setq rem-dec name))) - (tramp-message - vec 5 diff --git a/emacs/23.4/20_all_xz.patch b/emacs/23.4/20_all_xz.patch deleted file mode 100644 index 2c55b21..0000000 --- a/emacs/23.4/20_all_xz.patch +++ /dev/null @@ -1,323 +0,0 @@ -Backport xz support to Emacs 23.4. -This comprises parts of the following commits from upstream bzr: - -revno: 112525 -committer: Glenn Morris -branch nick: trunk -timestamp: Wed 2013-05-08 21:06:10 -0400 -message: - * lisp/jka-cmpr-hook.el (jka-compr-mode-alist-additions): Fix typo. - -revno: 111835 -fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13770 -author: Ulrich Müller -committer: Stefan Monnier -branch nick: trunk -timestamp: Wed 2013-02-20 09:30:23 -0500 -message: - * lisp/jka-cmpr-hook.el (jka-compr-compression-info-list) - (jka-compr-mode-alist-additions): Handle .txz suffix for - XZ-compressed tar archives. - -revno: 110764.1.62 -committer: Chong Yidong -branch nick: emacs-24 -timestamp: Fri 2012-11-09 16:34:17 +0800 -message: - More updates for the URL library manual. - -revno: 110534 -fixes bug: http://debbugs.gnu.org/11839 -author: Liam Stitt -committer: Chong Yidong -branch nick: trunk -timestamp: Sat 2012-10-13 18:51:26 +0800 -message: - Add .xz to some url code (tiny change). - * url-vars.el (url-uncompressor-alist): - * url-file.el (url-file-find-possibly-compressed-file, url-file): - Recognize .xz compression. - -revno: 107781.1.349 -fixes bug: http://debbugs.gnu.org/12382 -author: Joel Bion -committer: Glenn Morris -branch nick: emacs-24 -timestamp: Fri 2012-09-07 20:59:04 -0400 -message: - * lisp/pcmpl-gnu.el (pcmpl-gnu-tarfile-regexp): Add tar.xz. (tiny change) - -revno: 105835 -committer: Michael Albinus -branch nick: trunk -timestamp: Mon 2011-09-19 08:53:45 +0200 -message: - * net/tramp-sh.el (tramp-inline-compress-commands): Add "xz". - Suggested by Liam Stitt . - -revno: 101620 -author: Ulrich Mueller -committer: Glenn Morris -branch nick: trunk -timestamp: Sat 2010-09-25 14:42:48 -0700 -message: - Add more xz compression support. - - * doc/man/etags.1: xz compression is now supported. - * doc/misc/woman.texi (Interface Options): xz compression is now supported. - - * lib-src/etags.c (compressors, print_language_names): Support xz compression. - - * lisp/eshell/em-ls.el (eshell-ls-archive-regexp): - * lisp/eshell/esh-util.el (eshell-tar-regexp): - * lisp/ibuffer.el (ibuffer-compressed-file-name-regexp): - * lisp/info.el (Info-suffix-list): - * lisp/international/mule.el (auto-coding-alist): - * lisp/woman.el (woman-file-regexp, woman-file-compression-regexp): - * lisp/progmodes/etags.el (tags-compression-info-list): - Support xz compression. - ---- emacs-23.4-orig/doc/man/etags.1 -+++ emacs-23.4/doc/man/etags.1 -@@ -62,7 +62,7 @@ - with absolute file names. Files generated from a source file\-\-like - a C file generated from a source Cweb file\-\-will be recorded with - the name of the source file. --Compressed files are supported using gzip and bzip2. -+Compressed files are supported using gzip, bzip2, and xz. - The programs recognize the language used in an input file based on its - file name and contents. The \fB\-\-language\fP switch can be used to force - parsing of the file names following the switch according to the given ---- emacs-23.4-orig/doc/misc/url.texi -+++ emacs-23.4/doc/misc/url.texi -@@ -420,8 +420,8 @@ - - Compressed files are handled, but support is hard-coded so that - @code{jka-compr-compression-info-list} and so on have no affect. --Suffixes recognized are @samp{.z}, @samp{.gz}, @samp{.Z} and --@samp{.bz2}. -+Suffixes recognized are @samp{.z}, @samp{.gz}, @samp{.Z}, @samp{.bz2} -+and @samp{.xz}. - - @defopt url-directory-index-file - The filename to look for when indexing a directory, default ---- emacs-23.4-orig/doc/misc/woman.texi -+++ emacs-23.4/doc/misc/woman.texi -@@ -1121,8 +1121,8 @@ - for which decompressors are available and handled by auto-compression - mode. It should begin with @code{\\.} and end with @code{\\'} and - @emph{must not} be optional. The default value is --@code{"\\.\\(g?z\\|bz2\\)\\'"}, which matches the @code{gzip} and --@code{bzip2} compression extensions. -+@code{"\\.\\(g?z\\|bz2\\|xz\\)\\'"}, which matches the @code{gzip}, -+@code{bzip2}, and @code{xz} compression extensions. - - @emph{Do not change this unless you are sure you know what you are doing!} - ---- emacs-23.4-orig/lib-src/etags.c -+++ emacs-23.4/lib-src/etags.c -@@ -569,6 +569,7 @@ - { "gz", "gzip -d -c"}, - { "GZ", "gzip -d -c"}, - { "bz2", "bzip2 -d -c" }, -+ { "xz", "xz -d -c" }, - { NULL } - }; - -@@ -882,7 +883,7 @@ - Fortran is tried first; if no tags are found, C is tried next.\n\ - When parsing any C file, a \"class\" or \"template\" keyword\n\ - switches to C++."); -- puts ("Compressed files are supported using gzip and bzip2.\n\ -+ puts ("Compressed files are supported using gzip, bzip2, and xz.\n\ - \n\ - For detailed help on a given language use, for example,\n\ - etags --help --lang=ada."); ---- emacs-23.4-orig/lisp/eshell/em-ls.el -+++ emacs-23.4/lisp/eshell/em-ls.el -@@ -162,7 +162,7 @@ - - (defcustom eshell-ls-archive-regexp - (concat "\\.\\(t\\(a[rz]\\|gz\\)\\|arj\\|lzh\\|" -- "zip\\|[zZ]\\|gz\\|bz2\\|deb\\|rpm\\)\\'") -+ "zip\\|[zZ]\\|gz\\|bz2\\|xz\\|deb\\|rpm\\)\\'") - "*A regular expression that matches names of file archives. - This typically includes both traditional archives and compressed - files." ---- emacs-23.4-orig/lisp/eshell/esh-util.el -+++ emacs-23.4/lisp/eshell/esh-util.el -@@ -71,7 +71,7 @@ - :group 'eshell-util) - - (defcustom eshell-tar-regexp -- "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|Z\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'" -+ "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|xz\\|Z\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'" - "*Regular expression used to match tar file names." - :type 'regexp - :group 'eshell-util) ---- emacs-23.4-orig/lisp/ibuffer.el -+++ emacs-23.4/lisp/ibuffer.el -@@ -332,7 +332,7 @@ - :group 'ibuffer) - - (defcustom ibuffer-compressed-file-name-regexp -- "\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|zip\\|z\\)$" -+ "\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|xz\\|zip\\|z\\)$" - "Regexp to match compressed file names." - :type 'regexp - :group 'ibuffer) ---- emacs-23.4-orig/lisp/info.el -+++ emacs-23.4/lisp/info.el -@@ -398,24 +398,28 @@ - (".info.gz". "gunzip") - (".info.z". "gunzip") - (".info.bz2" . ("bzip2" "-dc")) -+ (".info.xz". "unxz") - (".info". nil) - ("-info.Z". "uncompress") - ("-info.Y". "unyabba") - ("-info.gz". "gunzip") - ("-info.bz2" . ("bzip2" "-dc")) - ("-info.z". "gunzip") -+ ("-info.xz". "unxz") - ("-info". nil) - ("/index.Z". "uncompress") - ("/index.Y". "unyabba") - ("/index.gz". "gunzip") - ("/index.z". "gunzip") - ("/index.bz2". ("bzip2" "-dc")) -+ ("/index.xz". "unxz") - ("/index". nil) - (".Z". "uncompress") - (".Y". "unyabba") - (".gz". "gunzip") - (".z". "gunzip") - (".bz2" . ("bzip2" "-dc")) -+ (".xz". "unxz") - ("". nil))) - "List of file name suffixes and associated decoding commands. - Each entry should be (SUFFIX . STRING); the file is given to ---- emacs-23.4-orig/lisp/international/mule.el -+++ emacs-23.4/lisp/international/mule.el -@@ -1629,7 +1629,7 @@ - . no-conversion-multibyte) - ("\\.\\(exe\\|EXE\\)\\'" . no-conversion) - ("\\.\\(sx[dmicw]\\|odt\\|tar\\|tgz\\)\\'" . no-conversion) -- ("\\.\\(gz\\|Z\\|bz\\|bz2\\|gpg\\)\\'" . no-conversion) -+ ("\\.\\(gz\\|Z\\|bz\\|bz2\\|xz\\|gpg\\)\\'" . no-conversion) - ("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion) - ("\\.pdf\\'" . no-conversion) - ("/#[^/]+#\\'" . emacs-mule))) ---- emacs-23.4-orig/lisp/jka-cmpr-hook.el -+++ emacs-23.4/lisp/jka-cmpr-hook.el -@@ -225,6 +225,10 @@ - "XZ compressing" "xz" ("-c" "-q") - "XZ uncompressing" "xz" ("-c" "-q" "-d") - t t "\3757zXZ\0"] -+ ["\\.txz\\'" -+ "XZ compressing" "xz" ("-c" "-q") -+ "XZ uncompressing" "xz" ("-c" "-q" "-d") -+ t nil "\3757zXZ\0"] - ;; dzip is gzip with random access. Its compression program can't - ;; read/write stdin/out, so .dz files can only be viewed without - ;; saving, having their contents decompressed with gzip. -@@ -292,7 +296,9 @@ - :group 'jka-compr) - - (defcustom jka-compr-mode-alist-additions -- (list (cons (purecopy "\\.tgz\\'") 'tar-mode) (cons (purecopy "\\.tbz2?\\'") 'tar-mode)) -+ (purecopy '(("\\.tgz\\'" . tar-mode) -+ ("\\.tbz2?\\'" . tar-mode) -+ ("\\.txz\\'" . tar-mode))) - "List of pairs added to `auto-mode-alist' when installing jka-compr. - Uninstalling jka-compr removes all pairs from `auto-mode-alist' that - installing added. ---- emacs-23.4-orig/lisp/net/tramp.el -+++ emacs-23.4/lisp/net/tramp.el -@@ -7364,6 +7364,7 @@ - (defconst tramp-inline-compress-commands - '(("gzip" "gzip -d") - ("bzip2" "bzip2 -d") -+ ("xz" "xz -d") - ("compress" "compress -d")) - "List of compress and decompress commands for inline transfer. - Each item is a list that looks like this: ---- emacs-23.4-orig/lisp/pcmpl-gnu.el -+++ emacs-23.4/lisp/pcmpl-gnu.el -@@ -122,7 +122,7 @@ - (pcomplete-uniqify-list rules)))) - - (defcustom pcmpl-gnu-tarfile-regexp -- "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|Z\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'" -+ "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|Z\\|xz\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'" - "A regexp which matches any tar archive." - :type 'regexp - :group 'pcmpl-gnu) ---- emacs-23.4-orig/lisp/progmodes/etags.el -+++ emacs-23.4/lisp/progmodes/etags.el -@@ -67,7 +67,8 @@ - :type '(repeat file)) - - ;;;###autoload --(defcustom tags-compression-info-list (purecopy '("" ".Z" ".bz2" ".gz" ".tgz")) -+(defcustom tags-compression-info-list -+ (purecopy '("" ".Z" ".bz2" ".gz" ".xz" ".tgz")) - "*List of extensions tried by etags when jka-compr is used. - An empty string means search the non-compressed file. - These extensions will be tried only if jka-compr was activated ---- emacs-23.4-orig/lisp/url/url-file.el -+++ emacs-23.4/lisp/url/url-file.el -@@ -42,7 +42,7 @@ - 'foo.gz' exists, even though the FTP server would happily serve it up - to them." - (let ((scratch nil) -- (compressed-extensions '("" ".gz" ".z" ".Z" ".bz2")) -+ (compressed-extensions '("" ".gz" ".z" ".Z" ".bz2" ".xz")) - (found nil)) - (while (and compressed-extensions (not found)) - (if (file-exists-p (setq scratch (concat fname (pop compressed-extensions)))) -@@ -172,6 +172,7 @@ - (\.uue "x-uuencoded") - (\.hqx "x-hqx") - (\.bz2 "x-bzip2") -+ (\.xz "x-xz") - (otherwise nil))) - - (if (file-directory-p filename) ---- emacs-23.4-orig/lisp/url/url-vars.el -+++ emacs-23.4/lisp/url/url-vars.el -@@ -165,7 +165,8 @@ - (".uue" . "x-uuencoded") - (".hqx" . "x-hqx") - (".Z" . "x-compress") -- (".bz2" . "x-bzip2")) -+ (".bz2" . "x-bzip2") -+ (".xz" . "x-xz")) - "*An alist of file extensions and appropriate content-transfer-encodings." - :type '(repeat (cons :format "%v" - (string :tag "Extension") ---- emacs-23.4-orig/lisp/woman.el -+++ emacs-23.4/lisp/woman.el -@@ -810,7 +810,7 @@ - - (defvar woman-file-regexp nil - "Regexp used to select (possibly compressed) man source files, e.g. --\"\\.\\([0-9lmnt]\\w*\\)\\(\\.\\(g?z\\|bz2\\)\\)?\\'\". -+\"\\.\\([0-9lmnt]\\w*\\)\\(\\.\\(g?z\\|bz2\\|xz\\)\\)?\\'\". - Built automatically from the customizable user options - `woman-uncompressed-file-regexp' and `woman-file-compression-regexp'.") - -@@ -846,11 +846,11 @@ - :group 'woman-interface) - - (defcustom woman-file-compression-regexp -- "\\.\\(g?z\\|bz2\\)\\'" -+ "\\.\\(g?z\\|bz2\\|xz\\)\\'" - "Do not change this unless you are sure you know what you are doing! - Regexp used to match compressed man file extensions for which - decompressors are available and handled by auto-compression mode, --e.g. \"\\\\.\\\\(g?z\\\\|bz2\\\\)\\\\'\" for `gzip' or `bzip2'. -+e.g. \"\\\\.\\\\(g?z\\\\|bz2\\\\|xz\\\\)\\\\'\" for `gzip', `bzip2', or `xz'. - Should begin with \\. and end with \\' and MUST NOT be optional." - ;; Should be compatible with car of - ;; `jka-compr-file-name-handler-entry', but that is unduly diff --git a/emacs/23.4/21_all_format-security.patch b/emacs/23.4/21_all_format-security.patch deleted file mode 100644 index e49e6df..0000000 --- a/emacs/23.4/21_all_format-security.patch +++ /dev/null @@ -1,14 +0,0 @@ -Avoid gcc -Wformat-security warning. -https://bugs.gentoo.org/512426 - ---- emacs-23.4-orig/lib-src/movemail.c -+++ emacs-23.4/lib-src/movemail.c -@@ -615,7 +615,7 @@ - else if (s2) - fprintf (stderr, s1, s2); - else -- fprintf (stderr, s1); -+ fprintf (stderr, "%s", s1); - fprintf (stderr, "\n"); - } - diff --git a/emacs/23.4/22_all_glibc-2.20.patch b/emacs/23.4/22_all_glibc-2.20.patch deleted file mode 100644 index 538dc9e..0000000 --- a/emacs/23.4/22_all_glibc-2.20.patch +++ /dev/null @@ -1,15 +0,0 @@ -Remove redundant _BSD_SOURCE macro causing warnings with glibc 2.20. - ---- emacs-23.4-orig/src/s/gnu-linux.h -+++ emacs-23.4/src/s/gnu-linux.h -@@ -210,10 +210,6 @@ - /* alane@wozzle.linet.org says that -lipc is not a separate library, - since libc-4.4.1. So -lipc was deleted. */ - #define LIBS_SYSTEM --/* _BSD_SOURCE is redundant, at least in glibc2, since we define -- _GNU_SOURCE. Left in in case it's relevant to libc5 systems and -- anyone's still using Emacs on those. --fx 2002-12-14 */ --#define C_SWITCH_SYSTEM -D_BSD_SOURCE - - /* Paul Abrahams says this is needed. */ - #define LIB_MOTIF -lXm -lXpm diff --git a/emacs/23.4/23_all_games-sgid.patch b/emacs/23.4/23_all_games-sgid.patch deleted file mode 100644 index 812ab4c..0000000 --- a/emacs/23.4/23_all_games-sgid.patch +++ /dev/null @@ -1,265 +0,0 @@ -Backport support for update-game-score to run sgid instead of suid. -This comprises parts of the following commits from upstream git: - -commit dbde138155118344b33dfd2db95f688a24a42fec -Author: Ulrich Müller -Date: Sun Feb 8 21:00:49 2015 +0100 - - configure --with-gameuser now defaults to games group. - -commit 74ab488ff2e57f31eb5290266f0f3b1995ebf83e -Author: Paul Eggert -Date: Thu Jan 22 00:39:30 2015 -0800 - - Check exit statuses in lib-src/Makefile - -commit 7f4e7dd378c456b498c270b47b46aaae365a72ab -Author: Ulrich Müller -Date: Thu Jan 22 08:24:42 2015 +0100 - - Don't fail if chown or chgrp for 'update-game-score' is unsuccessful. - -commit 20f66485526b69eb26f2e70bd835a5e1333559d5 -Author: Ulrich Müller -Date: Fri Jan 16 09:25:25 2015 +0100 - - Allow update-game-score to run sgid instead of suid. - ---- emacs-23.4-orig/configure.in -+++ emacs-23.4/configure.in -@@ -39,8 +39,6 @@ - docdir='${datadir}/emacs/${version}/etc' - gamedir='${localstatedir}/games/emacs' - --gameuser=games -- - dnl OPTION_DEFAULT_OFF(NAME, HELP-STRING) - dnl Create a new --with option that defaults to being disabled. - dnl NAME is the base name of the option. The shell variable with_NAME -@@ -176,10 +174,20 @@ - CRT_DIR="${with_crt_dir}" - - AC_ARG_WITH(gameuser,dnl --[AS_HELP_STRING([--with-gameuser=USER],[user for shared game score files])]) --test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ -- && gameuser="${with_gameuser}" --test "X$gameuser" = X && gameuser=games -+[AS_HELP_STRING([--with-gameuser=USER_OR_GROUP], -+ [user for shared game score files. -+ An argument prefixed by ':' specifies a group instead.])]) -+gameuser= -+gamegroup= -+# We don't test if we can actually chown/chgrp here, because configure -+# may run without root privileges. lib-src/Makefile.in will handle -+# any errors due to missing user/group gracefully. -+case ${with_gameuser} in -+ no) ;; -+ "" | yes) gamegroup=games ;; -+ :*) gamegroup=`echo "${with_gameuser}" | sed -e "s/://"` ;; -+ *) gameuser=${with_gameuser} ;; -+esac - - AC_ARG_WITH([gnustep-conf],dnl - [AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])]) -@@ -2708,6 +2716,7 @@ - AC_SUBST(bitmapdir) - AC_SUBST(gamedir) - AC_SUBST(gameuser) -+AC_SUBST(gamegroup) - AC_SUBST(c_switch_system) - AC_SUBST(c_switch_machine) - AC_SUBST(LD_SWITCH_X_SITE) ---- emacs-23.4-orig/lib-src/Makefile.in -+++ emacs-23.4/lib-src/Makefile.in -@@ -90,6 +90,7 @@ - - gamedir=@gamedir@ - gameuser=@gameuser@ -+gamegroup=@gamegroup@ - - # ==================== Utility Programs for the Build ================= - -@@ -310,10 +311,25 @@ - /* If the following commands fail, that is not a big deal. - update-game-score will detect at runtime that it is not setuid, - and handle things accordingly. */ -- -if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score && chmod u+s $(DESTDIR)${archlibdir}/update-game-score; then \ -- chown ${gameuser} $(DESTDIR)${gamedir}; \ -- chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \ -+ifneq ($(gameuser),) -+ if chown ${gameuser} \ -+ "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \ -+ chmod u+s,go-r \ -+ "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; \ -+ then \ -+ chown ${gameuser} "$(DESTDIR)${gamedir}" && \ -+ chmod u=rwx,g=rx,o=rx "$(DESTDIR)${gamedir}"; \ - fi -+else ifneq ($(gamegroup),) -+ if chgrp ${gamegroup} \ -+ "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \ -+ chmod g+s,o-r \ -+ "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; \ -+ then \ -+ chgrp ${gamegroup} "$(DESTDIR)${gamedir}" && \ -+ chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}"; \ -+ fi -+endif - if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` \ - != `(cd ${srcdir} && /bin/pwd)` ]; then \ - for file in ${SCRIPTS}; do \ ---- emacs-23.4-orig/lib-src/update-game-score.c -+++ emacs-23.4/lib-src/update-game-score.c -@@ -22,8 +22,8 @@ - - - /* This program allows a game to securely and atomically update a -- score file. It should be installed setuid, owned by an appropriate -- user like `games'. -+ score file. It should be installed either setuid or setgid, owned -+ by an appropriate user or group like `games'. - - Alternatively, it can be compiled without HAVE_SHARED_GAME_DIR - defined, and in that case it will store scores in the user's home -@@ -104,8 +104,8 @@ - int push_score P_ ((struct score_entry **scores, int *count, - int newscore, char *username, char *newdata)); - void sort_scores P_ ((struct score_entry *scores, int count, int reverse)); --int write_scores P_ ((const char *filename, const struct score_entry *scores, -- int count)); -+int write_scores P_ ((const char *filename, mode_t mode, -+ const struct score_entry *scores, int count)); - - void lose P_ ((const char *msg)) NO_RETURN; - -@@ -166,20 +166,21 @@ - } - - char * --get_prefix (running_suid, user_prefix) -- int running_suid; -+get_prefix (privileged, user_prefix) -+ int privileged; - char *user_prefix; - { -- if (!running_suid && user_prefix == NULL) -- lose ("Not using a shared game directory, and no prefix given."); -- if (running_suid) -+ if (privileged) - { - #ifdef HAVE_SHARED_GAME_DIR - return HAVE_SHARED_GAME_DIR; - #else -- lose ("This program was compiled without HAVE_SHARED_GAME_DIR,\n and should not be suid."); -+ lose ("This program was compiled without HAVE_SHARED_GAME_DIR,\n" -+ "and should not run with elevated privileges."); - #endif - } -+ if (user_prefix == NULL) -+ lose ("Not using a shared game directory, and no prefix given."); - return user_prefix; - } - -@@ -188,7 +189,7 @@ - int argc; - char **argv; - { -- int c, running_suid; -+ int c, running_suid, running_sgid; - void *lockstate; - char *user_id, *scorefile, *prefix, *user_prefix = NULL; - struct stat buf; -@@ -223,8 +224,11 @@ - usage (EXIT_FAILURE); - - running_suid = (getuid () != geteuid ()); -+ running_sgid = (getgid () != getegid ()); -+ if (running_suid && running_sgid) -+ lose ("This program can run either suid or sgid, but not both."); - -- prefix = get_prefix (running_suid, user_prefix); -+ prefix = get_prefix (running_suid || running_sgid, user_prefix); - - scorefile = malloc (strlen (prefix) + strlen (argv[optind]) + 2); - if (!scorefile) -@@ -263,7 +267,8 @@ - scorecount -= (scorecount - MAX_SCORES); - if (reverse) - scores += (scorecount - MAX_SCORES); -- if (write_scores (scorefile, scores, scorecount) < 0) -+ if (write_scores (scorefile, running_sgid ? 0664 : 0644, -+ scores, scorecount) < 0) - { - unlock_file (scorefile, lockstate); - lose_syserr ("Failed to write scores file"); -@@ -445,8 +450,9 @@ - } - - int --write_scores (filename, scores, count) -+write_scores (filename, mode, scores, count) - const char *filename; -+ mode_t mode; - const struct score_entry * scores; - int count; - { -@@ -471,7 +477,7 @@ - fclose (f); - if (rename (tempfile, filename) < 0) - return -1; -- if (chmod (filename, 0644) < 0) -+ if (chmod (filename, mode) < 0) - return -1; - return 0; - } ---- emacs-23.4-orig/lisp/play/gamegrid.el -+++ emacs-23.4/lisp/play/gamegrid.el -@@ -466,22 +466,22 @@ - ;; `gamegrid-add-score' was supposed to be used in the past and - ;; is covered here for backward-compatibility. - ;; --;; 2. The helper program "update-game-score" is setuid and the --;; file FILE does already exist in a system wide shared game --;; directory. This should be the normal case on POSIX systems, --;; if the game was installed system wide. Use -+;; 2. The helper program "update-game-score" is setgid or setuid -+;; and the file FILE does already exist in a system wide shared -+;; game directory. This should be the normal case on POSIX -+;; systems, if the game was installed system wide. Use - ;; "update-game-score" to add the score to the file in the - ;; shared game directory. - ;; --;; 3. "update-game-score" is setuid, but the file FILE does *not* --;; exist in the system wide shared game directory. Use -+;; 3. "update-game-score" is setgid/setuid, but the file FILE does -+;; *not* exist in the system wide shared game directory. Use - ;; `gamegrid-add-score-insecure' to create--if necessary--and - ;; update FILE. This is for the case that a user has installed - ;; a game on her own. - ;; --;; 4. "update-game-score" is not setuid. Use it to create/update --;; FILE in the user's home directory. There is presumably no --;; shared game directory. -+;; 4. "update-game-score" is not setgid/setuid. Use it to -+;; create/update FILE in the user's home directory. There is -+;; presumably no shared game directory. - - (defvar gamegrid-shared-game-dir) - -@@ -491,13 +491,13 @@ - (not (zerop (logand (file-modes - (expand-file-name "update-game-score" - exec-directory)) -- #o4000))))) -+ #o6000))))) - (cond ((file-name-absolute-p file) - (gamegrid-add-score-insecure file score)) - ((and gamegrid-shared-game-dir - (file-exists-p (expand-file-name file shared-game-score-directory))) -- ;; Use the setuid "update-game-score" program to update a -- ;; system-wide score file. -+ ;; Use the setgid (or setuid) "update-game-score" program -+ ;; to update a system-wide score file. - (gamegrid-add-score-with-update-game-score-1 file - (expand-file-name file shared-game-score-directory) score)) - ;; Else: Add the score to a score file in the user's home diff --git a/emacs/23.4/24_all_browse-url-firefox.patch b/emacs/23.4/24_all_browse-url-firefox.patch deleted file mode 100644 index d87c953..0000000 --- a/emacs/23.4/24_all_browse-url-firefox.patch +++ /dev/null @@ -1,105 +0,0 @@ -https://bugs.gentoo.org/542046 -http://debbugs.gnu.org/19921 - -This comprises parts of the following commit from upstream git: - -commit 1b0ebbdb566a8dfa5f45ce121b2c835e9760091f -Author: Glenn Morris -Date: Tue Feb 24 18:02:11 2015 -0500 - - browse-url-firefox: update for firefox 36's removal of -remote - ---- emacs-23.4-orig/lisp/net/browse-url.el -+++ emacs-23.4/lisp/net/browse-url.el -@@ -330,6 +330,9 @@ - :type '(repeat (string :tag "Argument")) - :group 'browse-url) - -+(make-obsolete-variable 'browse-url-firefox-startup-arguments -+ "it no longer has any effect." "23.4-r13") -+ - ;;;###autoload - (defcustom browse-url-galeon-program (purecopy "galeon") - "The name by which to invoke Galeon." -@@ -1024,63 +1027,32 @@ - ;;;###autoload - (defun browse-url-firefox (url &optional new-window) - "Ask the Firefox WWW browser to load URL. --Default to the URL around or before point. The strings in --variable `browse-url-firefox-arguments' are also passed to --Firefox. -+Defaults to the URL around or before point. Passes the strings -+in the variable `browse-url-firefox-arguments' to Firefox. - --When called interactively, if variable --`browse-url-new-window-flag' is non-nil, load the document in a --new Firefox window, otherwise use a random existing one. A --non-nil interactive prefix argument reverses the effect of --`browse-url-new-window-flag'. -+Interactively, if the variable `browse-url-new-window-flag' is non-nil, -+loads the document in a new Firefox window. A non-nil prefix argument -+reverses the effect of `browse-url-new-window-flag'. - - If `browse-url-firefox-new-window-is-tab' is non-nil, then - whenever a document would otherwise be loaded in a new window, it - is loaded in a new tab in an existing window instead. - --When called non-interactively, optional second argument --NEW-WINDOW is used instead of `browse-url-new-window-flag'. -- --On MS-Windows systems the optional `new-window' parameter is --ignored. Firefox for Windows does not support the \"-remote\" --command line parameter. Therefore, the --`browse-url-new-window-flag' and `browse-url-firefox-new-window-is-tab' --are ignored as well. Firefox on Windows will always open the requested --URL in a new window." -+Non-interactively, this uses the optional second argument NEW-WINDOW -+instead of `browse-url-new-window-flag'." - (interactive (browse-url-interactive-arg "URL: ")) - (setq url (browse-url-encode-url url)) -- (let* ((process-environment (browse-url-process-environment)) -- (process -- (apply 'start-process -- (concat "firefox " url) nil -- browse-url-firefox-program -- (append -- browse-url-firefox-arguments -- (if (or (featurep 'dos-w32) -- (string-match "win32" system-configuration)) -- (list url) -- (list "-remote" -- (concat "openURL(" -- url -- (if (browse-url-maybe-new-window -- new-window) -- (if browse-url-firefox-new-window-is-tab -- ",new-tab" -- ",new-window")) -- ")"))))))) -- (set-process-sentinel process -- `(lambda (process change) -- (browse-url-firefox-sentinel process ,url))))) -- --(defun browse-url-firefox-sentinel (process url) -- "Handle a change to the process communicating with Firefox." -- (or (eq (process-exit-status process) 0) -- (let* ((process-environment (browse-url-process-environment))) -- ;; Firefox is not running - start it -- (message "Starting Firefox...") -- (apply 'start-process (concat "firefox " url) nil -- browse-url-firefox-program -- (append browse-url-firefox-startup-arguments (list url)))))) -+ (let* ((process-environment (browse-url-process-environment))) -+ (apply 'start-process -+ (concat "firefox " url) nil -+ browse-url-firefox-program -+ (append -+ browse-url-firefox-arguments -+ (if (browse-url-maybe-new-window new-window) -+ (if browse-url-firefox-new-window-is-tab -+ '("-new-tab") -+ '("-new-window"))) -+ (list url))))) - - ;;;###autoload - (defun browse-url-galeon (url &optional new-window) diff --git a/emacs/23.4/25_all_jpeg-version.patch b/emacs/23.4/25_all_jpeg-version.patch deleted file mode 100644 index 8b82827..0000000 --- a/emacs/23.4/25_all_jpeg-version.patch +++ /dev/null @@ -1,25 +0,0 @@ -Fix jpeg version check to work with gcc >= 5. -Comprises part of the following commit from the emacs-24 branch: - -commit ff3878d749591ebf78da532ec1eb6fa00cb5757d -Author: Andreas Schwab -Date: Mon Mar 23 11:55:24 2015 +0100 - - * configure.ac: Fix jpeg version check to work with gcc >= 5. - ---- emacs-23.4-orig/configure.in -+++ emacs-23.4/configure.in -@@ -2176,9 +2176,11 @@ - AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl - if test "${HAVE_JPEG}" = "yes"; then - AC_DEFINE(HAVE_JPEG) -- AC_EGREP_CPP([version= *(6[2-9]|[7-9][0-9])], -+ AC_EGREP_CPP([version 6b or later], - [#include -- version=JPEG_LIB_VERSION -+ #if JPEG_LIB_VERSION >= 62 -+ version 6b or later -+ #endif - ], - [AC_DEFINE(HAVE_JPEG)], - [AC_MSG_WARN([libjpeg found, but not version 6b or later]) diff --git a/emacs/23.4/26_all_giflib-5.patch b/emacs/23.4/26_all_giflib-5.patch deleted file mode 100644 index b3b4ed0..0000000 --- a/emacs/23.4/26_all_giflib-5.patch +++ /dev/null @@ -1,150 +0,0 @@ -Fix compilation with giflib-5. -Backported from Emacs 24, comprises parts of the following commits: - -commit be316ede5fffb724852ee225489e70778d240bb0 -Author: Paul Eggert -Date: Tue Jan 7 13:14:32 2014 -0800 - - Fix misdisplay of interlaced GIFs with libgif5. - -commit f3606ef766bcec86789316a05949f1e67a51e7c1 -Author: Barry Fishman -Date: Wed Oct 9 20:37:44 2013 -0400 - - Handle giflib 5 changes (tiny change) - ---- emacs-23.4-orig/configure.in -+++ emacs-23.4/configure.in -@@ -2226,8 +2226,9 @@ - if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then - AC_CHECK_HEADER(gif_lib.h, - # EGifPutExtensionLast only exists from version libungif-4.1.0b1. --# Earlier versions can crash Emacs. -- [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, try_libungif=yes)]) -+# Earlier versions can crash Emacs, but version 5.0 removes EGifPutExtensionLast. -+ [AC_CHECK_LIB(gif, GifMakeMapObject, HAVE_GIF=yes, -+ [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, try_libungif=yes)])]) - - if test "$HAVE_GIF" = yes; then - ac_gif_lib_name="-lgif" ---- emacs-23.4-orig/src/image.c -+++ emacs-23.4/src/image.c -@@ -7244,6 +7244,13 @@ - - #endif /* HAVE_NTGUI */ - -+/* Giflib before 5.0 didn't define these macros. */ -+#ifndef GIFLIB_MAJOR -+#define GIFLIB_MAJOR 0 -+#endif -+#ifndef GIFLIB_MINOR -+#define GIFLIB_MINOR 0 -+#endif - - #ifdef HAVE_NTGUI - -@@ -7350,7 +7357,11 @@ - } - - /* Open the GIF file. */ -+#if GIFLIB_MAJOR < 5 - gif = fn_DGifOpenFileName (SDATA (file)); -+#else -+ gif = fn_DGifOpenFileName (SDATA (file), NULL); -+#endif - if (gif == NULL) - { - image_error ("Cannot open `%s'", file, Qnil); -@@ -7366,7 +7377,11 @@ - memsrc.len = SBYTES (specified_data); - memsrc.index = 0; - -+#if GIFLIB_MAJOR < 5 - gif = fn_DGifOpen (&memsrc, gif_read_from_memory); -+#else -+ gif = fn_DGifOpen (&memsrc, gif_read_from_memory, NULL); -+#endif - if (!gif) - { - image_error ("Cannot open memory source `%s'", img->spec, Qnil); -@@ -7379,7 +7394,11 @@ - if (!check_image_size (f, gif->SWidth, gif->SHeight)) - { - image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); -+#if GIFLIB_MAJOR < 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR == 0) - fn_DGifCloseFile (gif); -+#else -+ fn_DGifCloseFile (gif, NULL); -+#endif - UNGCPRO; - return 0; - } -@@ -7389,7 +7408,11 @@ - if (rc == GIF_ERROR) - { - image_error ("Error reading `%s'", img->spec, Qnil); -+#if GIFLIB_MAJOR < 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR == 0) - fn_DGifCloseFile (gif); -+#else -+ fn_DGifCloseFile (gif, NULL); -+#endif - UNGCPRO; - return 0; - } -@@ -7400,7 +7423,11 @@ - { - image_error ("Invalid image number `%s' in image `%s'", - image, img->spec); -+#if GIFLIB_MAJOR < 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR == 0) - fn_DGifCloseFile (gif); -+#else -+ fn_DGifCloseFile (gif, NULL); -+#endif - UNGCPRO; - return 0; - } -@@ -7422,7 +7449,11 @@ - if (!check_image_size (f, width, height)) - { - image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); -+#if GIFLIB_MAJOR < 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR == 0) - fn_DGifCloseFile (gif); -+#else -+ fn_DGifCloseFile (gif, NULL); -+#endif - UNGCPRO; - return 0; - } -@@ -7430,7 +7461,11 @@ - /* Create the X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) - { -+#if GIFLIB_MAJOR < 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR == 0) - fn_DGifCloseFile (gif); -+#else -+ fn_DGifCloseFile (gif, NULL); -+#endif - UNGCPRO; - return 0; - } -@@ -7482,7 +7517,7 @@ - problems with bytes >= 0x80. */ - raster = (unsigned char *) gif->SavedImages[ino].RasterBits; - -- if (gif->SavedImages[ino].ImageDesc.Interlace) -+ if (GIFLIB_MAJOR < 5 && gif->SavedImages[ino].ImageDesc.Interlace) - { - int pass; - int row = interlace_start[0]; -@@ -7537,7 +7572,11 @@ - Fcons (make_number (gif->ImageCount), - img->data.lisp_val)); - -+#if GIFLIB_MAJOR < 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR == 0) - fn_DGifCloseFile (gif); -+#else -+ fn_DGifCloseFile (gif, NULL); -+#endif - - /* Maybe fill in the background field while we have ximg handy. */ - if (NILP (image_spec_value (img->spec, QCbackground, NULL))) diff --git a/emacs/23.4/27_all_conftest-doug-lea.patch b/emacs/23.4/27_all_conftest-doug-lea.patch deleted file mode 100644 index d4a79b8..0000000 --- a/emacs/23.4/27_all_conftest-doug-lea.patch +++ /dev/null @@ -1,46 +0,0 @@ -Fix segmentation fault in emacs during compile phase. -https://bugs.gentoo.org/602992 - -Backported from Emacs 24: - -commit 4b5b5289577b4cc89ee45595832f943ef9a43de6 -Author: Paul Eggert -Date: Sat Apr 21 23:56:42 2012 -0700 - - * configure.in (doug_lea_malloc): Check for __malloc_initialize_hook. - ---- emacs-23.4-orig/configure.in -+++ emacs-23.4/configure.in -@@ -1505,17 +1505,21 @@ - # Do the opsystem or machine files prohibit the use of the GNU malloc? - # Assume not, until told otherwise. - GNU_MALLOC=yes --doug_lea_malloc=yes --AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no) --AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) --AC_CACHE_CHECK(whether __after_morecore_hook exists, -- emacs_cv_var___after_morecore_hook, --[AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0], -- emacs_cv_var___after_morecore_hook=yes, -- emacs_cv_var___after_morecore_hook=no)]) --if test $emacs_cv_var___after_morecore_hook = no; then -- doug_lea_malloc=no --fi -+ -+AC_CACHE_CHECK( -+ [whether malloc is Doug Lea style], -+ [emacs_cv_var_doug_lea_malloc], -+ [AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[#include -+ static void hook (void) {}]], -+ [[malloc_set_state (malloc_get_state ()); -+ __after_morecore_hook = hook; -+ __malloc_initialize_hook = hook;]])], -+ [emacs_cv_var_doug_lea_malloc=yes], -+ [emacs_cv_var_doug_lea_malloc=no])]) -+doug_lea_malloc=$emacs_cv_var_doug_lea_malloc -+ - if test "${system_malloc}" = "yes"; then - GNU_MALLOC=no - GNU_MALLOC_reason=" diff --git a/emacs/23.4/28_all_gmalloc.patch b/emacs/23.4/28_all_gmalloc.patch deleted file mode 100644 index 275f634..0000000 --- a/emacs/23.4/28_all_gmalloc.patch +++ /dev/null @@ -1,65 +0,0 @@ -Fix endless calloc loop causing temacs to hang. -https://bugs.gentoo.org/602992 -https://bugs.gentoo.org/609680 - -Backported from Emacs 25: - -commit 4b1436b702d56eedd27a0777fc7232cdfb7ac4f6 -Author: Wolfgang Jenkner -Date: Sat Dec 26 12:12:02 2015 -0800 - - Always define gmalloc etc. in src/gmalloc.c - ---- emacs-23.4-orig/src/gmalloc.c -+++ emacs-23.4/src/gmalloc.c -@@ -83,6 +83,14 @@ - - #endif /* _MALLOC_INTERNAL. */ - -+#undef malloc -+#undef realloc -+#undef calloc -+#undef free -+#define malloc gmalloc -+#define realloc grealloc -+#define calloc gcalloc -+#define free gfree - - #ifdef __cplusplus - extern "C" -@@ -1943,6 +1951,35 @@ - - #endif /* Not ELIDE_VALLOC. */ - -+#undef malloc -+#undef realloc -+#undef calloc -+#undef free -+ -+void * -+malloc (size_t size) -+{ -+ return gmalloc (size); -+} -+ -+void * -+calloc (size_t nmemb, size_t size) -+{ -+ return gcalloc (nmemb, size); -+} -+ -+void -+free (void *ptr) -+{ -+ gfree (ptr); -+} -+ -+void * -+realloc (void *ptr, size_t size) -+{ -+ return grealloc (ptr, size); -+} -+ - #ifdef GC_MCHECK - - /* Standard debugging hooks for `malloc'. diff --git a/emacs/23.4/29_all_enriched-mode.patch b/emacs/23.4/29_all_enriched-mode.patch deleted file mode 100644 index b4b682f..0000000 --- a/emacs/23.4/29_all_enriched-mode.patch +++ /dev/null @@ -1,79 +0,0 @@ -Fix security vulnerability in enriched mode. -https://bugs.gentoo.org/630680 - -Backported from Emacs 25: - -commit 9ad0fcc54442a9a01d41be19880250783426db70 -Author: Lars Ingebrigtsen -Date: Fri Sep 8 20:23:31 2017 -0700 - - Remove unsafe enriched mode translations - - * lisp/gnus/mm-view.el (mm-inline-text): - Do not worry about enriched or richtext type. - * lisp/textmodes/enriched.el (enriched-translations): - Remove translations for FUNCTION, display (Bug#28350). - (enriched-handle-display-prop, enriched-decode-display-prop): Remove. - ---- emacs-23.4-orig/lisp/gnus/mm-view.el -+++ emacs-23.4/lisp/gnus/mm-view.el -@@ -454,10 +454,6 @@ - (goto-char (point-max)))) - (save-restriction - (narrow-to-region b (point)) -- (when (member type '("enriched" "richtext")) -- (set-text-properties (point-min) (point-max) nil) -- (ignore-errors -- (enriched-decode (point-min) (point-max)))) - (mm-handle-set-undisplayer - handle - `(lambda () ---- emacs-23.4-orig/lisp/textmodes/enriched.el -+++ emacs-23.4/lisp/textmodes/enriched.el -@@ -118,12 +118,7 @@ - (full "flushboth") - (center "center")) - (PARAMETER (t "param")) ; Argument of preceding annotation -- ;; The following are not part of the standard: -- (FUNCTION (enriched-decode-foreground "x-color") -- (enriched-decode-background "x-bg-color") -- (enriched-decode-display-prop "x-display")) - (read-only (t "x-read-only")) -- (display (nil enriched-handle-display-prop)) - (unknown (nil format-annotate-value)) - ; (font-size (2 "bigger") ; unimplemented - ; (-2 "smaller")) -@@ -474,33 +469,6 @@ - (message "Warning: no color specified for ") - nil)) - --;;; Handling the `display' property. -- -- --(defun enriched-handle-display-prop (old new) -- "Return a list of annotations for a change in the `display' property. --OLD is the old value of the property, NEW is the new value. Value --is a list `(CLOSE OPEN)', where CLOSE is a list of annotations to --close and OPEN a list of annotations to open. Each of these lists --has the form `(ANNOTATION PARAM ...)'." -- (let ((annotation "x-display") -- (param (prin1-to-string (or old new)))) -- (if (null old) -- (cons nil (list (list annotation param))) -- (cons (list (list annotation param)) nil)))) -- --(defun enriched-decode-display-prop (start end &optional param) -- "Decode a `display' property for text between START and END. --PARAM is a `' found for the property. --Value is a list `(START END SYMBOL VALUE)' with START and END denoting --the range of text to assign text property SYMBOL with value VALUE." -- (let ((prop (when (stringp param) -- (condition-case () -- (car (read-from-string param)) -- (error nil))))) -- (unless prop -- (message "Warning: invalid parameter %s" param)) -- (list start end 'display prop))) - - ;; arch-tag: 05cae488-3fea-45cd-ac29-5b02cb64e42b - ;;; enriched.el ends here diff --git a/emacs/23.4/30_all_glibc-2.28.patch b/emacs/23.4/30_all_glibc-2.28.patch deleted file mode 100644 index e62239f..0000000 --- a/emacs/23.4/30_all_glibc-2.28.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix compilation with glibc-2.28. -https://bugs.gentoo.org/681904 - ---- emacs-23.4-orig/src/s/gnu-linux.h -+++ emacs-23.4/src/s/gnu-linux.h -@@ -150,7 +150,8 @@ - - #ifdef emacs - #include /* Get the definition of _IO_STDIO_H. */ --#if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM) -+#if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM) \ -+ || defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 - /* new C libio names */ - #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ - ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) diff --git a/emacs/23.4/31_all_dso-handle.patch b/emacs/23.4/31_all_dso-handle.patch deleted file mode 100644 index 673e90e..0000000 --- a/emacs/23.4/31_all_dso-handle.patch +++ /dev/null @@ -1,13 +0,0 @@ -https://bugs.gentoo.org/682282 - ---- emacs-23.4-orig/src/emacs.c -+++ emacs-23.4/src/emacs.c -@@ -217,6 +217,8 @@ - output a warning in dump-emacs. */ - #define MAX_HEAP_BSS_DIFF (1024*1024) - -+void *__dso_handle = NULL; -+ - - #ifdef HAVE_WINDOW_SYSTEM - extern Lisp_Object Vinitial_window_system; diff --git a/emacs/24.5/04_all_games-sgid.patch b/emacs/24.5/04_all_games-sgid.patch deleted file mode 100644 index 882e3ca..0000000 --- a/emacs/24.5/04_all_games-sgid.patch +++ /dev/null @@ -1,259 +0,0 @@ -Backport support for update-game-score to run sgid instead of suid. -This comprises parts of the following commits from upstream git: - -commit dbde138155118344b33dfd2db95f688a24a42fec -Author: Ulrich Müller -Date: Sun Feb 8 21:00:49 2015 +0100 - - configure --with-gameuser now defaults to games group. - -commit 74ab488ff2e57f31eb5290266f0f3b1995ebf83e -Author: Paul Eggert -Date: Thu Jan 22 00:39:30 2015 -0800 - - Check exit statuses in lib-src/Makefile - -commit 7f4e7dd378c456b498c270b47b46aaae365a72ab -Author: Ulrich Müller -Date: Thu Jan 22 08:24:42 2015 +0100 - - Don't fail if chown or chgrp for 'update-game-score' is unsuccessful. - -commit 20f66485526b69eb26f2e70bd835a5e1333559d5 -Author: Ulrich Müller -Date: Fri Jan 16 09:25:25 2015 +0100 - - Allow update-game-score to run sgid instead of suid. - ---- emacs-24.4-orig/configure.ac -+++ emacs-24.4/configure.ac -@@ -313,10 +313,20 @@ - fi - - AC_ARG_WITH(gameuser,dnl --[AS_HELP_STRING([--with-gameuser=USER],[user for shared game score files])]) --test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ -- && gameuser="${with_gameuser}" --test "X$gameuser" = X && gameuser=games -+[AS_HELP_STRING([--with-gameuser=USER_OR_GROUP], -+ [user for shared game score files. -+ An argument prefixed by ':' specifies a group instead.])]) -+gameuser= -+gamegroup= -+# We don't test if we can actually chown/chgrp here, because configure -+# may run without root privileges. lib-src/Makefile.in will handle -+# any errors due to missing user/group gracefully. -+case ${with_gameuser} in -+ no) ;; -+ "" | yes) gamegroup=games ;; -+ :*) gamegroup=`echo "${with_gameuser}" | sed -e "s/://"` ;; -+ *) gameuser=${with_gameuser} ;; -+esac - - AC_ARG_WITH([gnustep-conf],dnl - [AS_HELP_STRING([--with-gnustep-conf=FILENAME], -@@ -4658,6 +4668,7 @@ - AC_SUBST(bitmapdir) - AC_SUBST(gamedir) - AC_SUBST(gameuser) -+AC_SUBST(gamegroup) - ## FIXME? Nothing uses @LD_SWITCH_X_SITE@. - ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the - ## end of LIBX_BASE, but nothing ever set it. ---- emacs-24.4-orig/lib-src/Makefile.in -+++ emacs-24.4/lib-src/Makefile.in -@@ -101,6 +101,7 @@ - - gamedir=@gamedir@ - gameuser=@gameuser@ -+gamegroup=@gamegroup@ - - # ==================== Utility Programs for the Build ================= - -@@ -243,10 +244,25 @@ - umask 022; ${MKDIR_P} "$(DESTDIR)${gamedir}"; \ - touch "$(DESTDIR)${gamedir}/snake-scores"; \ - touch "$(DESTDIR)${gamedir}/tetris-scores" -- -if chown ${gameuser} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && chmod u+s "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; then \ -- chown ${gameuser} "$(DESTDIR)${gamedir}"; \ -+ifneq ($(gameuser),) -+ if chown ${gameuser} \ -+ "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \ -+ chmod u+s,go-r \ -+ "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; \ -+ then \ -+ chown ${gameuser} "$(DESTDIR)${gamedir}" && \ -+ chmod u=rwx,g=rx,o=rx "$(DESTDIR)${gamedir}"; \ -+ fi -+else ifneq ($(gamegroup),) -+ if chgrp ${gamegroup} \ -+ "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \ -+ chmod g+s,o-r \ -+ "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"; \ -+ then \ -+ chgrp ${gamegroup} "$(DESTDIR)${gamedir}" && \ - chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}"; \ - fi -+endif - exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd`; \ - if [ "$$exp_archlibdir" != "`cd ${srcdir} && /bin/pwd`" ]; then \ - for file in ${SCRIPTS}; do \ ---- emacs-24.4-orig/lib-src/update-game-score.c -+++ emacs-24.4/lib-src/update-game-score.c -@@ -21,8 +21,8 @@ - - - /* This program allows a game to securely and atomically update a -- score file. It should be installed setuid, owned by an appropriate -- user like `games'. -+ score file. It should be installed either setuid or setgid, owned -+ by an appropriate user or group like `games'. - - Alternatively, it can be compiled without HAVE_SHARED_GAME_DIR - defined, and in that case it will store scores in the user's home -@@ -89,7 +89,7 @@ - ptrdiff_t *size, struct score_entry const *newscore); - static void sort_scores (struct score_entry *scores, ptrdiff_t count, - bool reverse); --static int write_scores (const char *filename, -+static int write_scores (const char *filename, mode_t mode, - const struct score_entry *scores, ptrdiff_t count); - - static _Noreturn void -@@ -122,18 +122,19 @@ - } - - static const char * --get_prefix (bool running_suid, const char *user_prefix) -+get_prefix (bool privileged, const char *user_prefix) - { -- if (!running_suid && user_prefix == NULL) -- lose ("Not using a shared game directory, and no prefix given."); -- if (running_suid) -+ if (privileged) - { - #ifdef HAVE_SHARED_GAME_DIR - return HAVE_SHARED_GAME_DIR; - #else -- lose ("This program was compiled without HAVE_SHARED_GAME_DIR,\n and should not be suid."); -+ lose ("This program was compiled without HAVE_SHARED_GAME_DIR,\n" -+ "and should not run with elevated privileges."); - #endif - } -+ if (user_prefix == NULL) -+ lose ("Not using a shared game directory, and no prefix given."); - return user_prefix; - } - -@@ -141,7 +142,7 @@ - main (int argc, char **argv) - { - int c; -- bool running_suid; -+ bool running_suid, running_sgid; - void *lockstate; - char *scorefile; - char *nl; -@@ -183,8 +184,11 @@ - usage (EXIT_FAILURE); - - running_suid = (getuid () != geteuid ()); -+ running_sgid = (getgid () != getegid ()); -+ if (running_suid && running_sgid) -+ lose ("This program can run either suid or sgid, but not both."); - -- prefix = get_prefix (running_suid, user_prefix); -+ prefix = get_prefix (running_suid || running_sgid, user_prefix); - - scorefile = malloc (strlen (prefix) + strlen (argv[optind]) + 2); - if (!scorefile) -@@ -234,7 +238,8 @@ - scores += scorecount - max_scores; - scorecount = max_scores; - } -- if (write_scores (scorefile, scores, scorecount) < 0) -+ if (write_scores (scorefile, running_sgid ? 0664 : 0644, -+ scores, scorecount) < 0) - { - unlock_file (scorefile, lockstate); - lose_syserr ("Failed to write scores file"); -@@ -429,8 +434,8 @@ - } - - static int --write_scores (const char *filename, const struct score_entry *scores, -- ptrdiff_t count) -+write_scores (const char *filename, mode_t mode, -+ const struct score_entry *scores, ptrdiff_t count) - { - int fd; - FILE *f; -@@ -444,7 +449,7 @@ - if (fd < 0) - return -1; - #ifndef DOS_NT -- if (fchmod (fd, 0644) != 0) -+ if (fchmod (fd, mode) != 0) - return -1; - #endif - f = fdopen (fd, "w"); -@@ -460,7 +465,7 @@ - if (rename (tempfile, filename) != 0) - return -1; - #ifdef DOS_NT -- if (chmod (filename, 0644) < 0) -+ if (chmod (filename, mode) < 0) - return -1; - #endif - return 0; ---- emacs-24.4-orig/lisp/play/gamegrid.el -+++ emacs-24.4/lisp/play/gamegrid.el -@@ -462,22 +462,22 @@ - ;; `gamegrid-add-score' was supposed to be used in the past and - ;; is covered here for backward-compatibility. - ;; --;; 2. The helper program "update-game-score" is setuid and the --;; file FILE does already exist in a system wide shared game --;; directory. This should be the normal case on POSIX systems, --;; if the game was installed system wide. Use -+;; 2. The helper program "update-game-score" is setgid or setuid -+;; and the file FILE does already exist in a system wide shared -+;; game directory. This should be the normal case on POSIX -+;; systems, if the game was installed system wide. Use - ;; "update-game-score" to add the score to the file in the - ;; shared game directory. - ;; --;; 3. "update-game-score" is setuid, but the file FILE does *not* --;; exist in the system wide shared game directory. Use -+;; 3. "update-game-score" is setgid/setuid, but the file FILE does -+;; *not* exist in the system wide shared game directory. Use - ;; `gamegrid-add-score-insecure' to create--if necessary--and - ;; update FILE. This is for the case that a user has installed - ;; a game on her own. - ;; --;; 4. "update-game-score" is not setuid. Use it to create/update --;; FILE in the user's home directory. There is presumably no --;; shared game directory. -+;; 4. "update-game-score" is not setgid/setuid. Use it to -+;; create/update FILE in the user's home directory. There is -+;; presumably no shared game directory. - - (defvar gamegrid-shared-game-dir) - -@@ -486,13 +486,13 @@ - (not (zerop (logand (file-modes - (expand-file-name "update-game-score" - exec-directory)) -- #o4000))))) -+ #o6000))))) - (cond ((file-name-absolute-p file) - (gamegrid-add-score-insecure file score)) - ((and gamegrid-shared-game-dir - (file-exists-p (expand-file-name file shared-game-score-directory))) -- ;; Use the setuid "update-game-score" program to update a -- ;; system-wide score file. -+ ;; Use the setgid (or setuid) "update-game-score" program -+ ;; to update a system-wide score file. - (gamegrid-add-score-with-update-game-score-1 file - (expand-file-name file shared-game-score-directory) score)) - ;; Else: Add the score to a score file in the user's home diff --git a/emacs/24.5/06_all_gtk-toolbar.patch b/emacs/24.5/06_all_gtk-toolbar.patch deleted file mode 100644 index d3cc5d6..0000000 --- a/emacs/24.5/06_all_gtk-toolbar.patch +++ /dev/null @@ -1,922 +0,0 @@ -Fix icons in toolbar with GTK+ 3.20.6. -https://bugs.gentoo.org/588704 -https://bugs.archlinux.org/task/48862 - -This comprises the following commits from upstream git, backported -to Emacs 24.5: - -commit 4e94689452f3a895a52e67787b795596c2390462 -Author: Paul Eggert -Date: Sat Oct 18 12:07:17 2014 -0700 - - * gtkutil.c: Remove no-longer-used code. - -commit 6e5ff6166647e6af30beff38f67f2bca86cf9786 -Author: Jan Djärv -Date: Sat Oct 18 18:26:47 2014 +0200 - - * cus-start.el (x-gtk-whole-detached-tool-bar): Remove. - -commit ac225d22f68af9531bc25d6ab83c11797105b5bc -Author: Jan Djärv -Date: Sat Oct 18 18:25:24 2014 +0200 - - * xfns.c (syms_of_xfns): Remove x-gtk-whole-detached-tool-bar. - -commit 3f4c6d52d345999938bc2d4a53246af4c61ef176 -Author: Jan Djärv -Date: Sat Oct 18 18:19:53 2014 +0200 - - Handle deprecated Gtk+ stuff for version <= 3.10 - ---- emacs-24.5-orig/lisp/cus-start.el -+++ emacs-24.5/lisp/cus-start.el -@@ -519,7 +519,6 @@ - (x-gtk-use-old-file-dialog menu boolean "22.1") - (x-gtk-show-hidden-files menu boolean "22.1") - (x-gtk-file-dialog-help-text menu boolean "22.1") -- (x-gtk-whole-detached-tool-bar x boolean "22.1") - (x-gtk-use-system-tooltips tooltip boolean "23.3") - ;; xterm.c - (x-use-underline-position-properties display boolean "22.1") ---- emacs-24.5-orig/lisp/term/x-win.el -+++ emacs-24.5/lisp/term/x-win.el -@@ -1475,47 +1475,47 @@ - (mapcar (lambda (arg) - (cons (purecopy (car arg)) (purecopy (cdr arg)))) - '( -- ("etc/images/new" . "gtk-new") -- ("etc/images/open" . "gtk-open") -+ ("etc/images/new" . ("document-new" "gtk-new")) -+ ("etc/images/open" . ("document-open" "gtk-open")) - ("etc/images/diropen" . "n:system-file-manager") -- ("etc/images/close" . "gtk-close") -- ("etc/images/save" . "gtk-save") -- ("etc/images/saveas" . "gtk-save-as") -- ("etc/images/undo" . "gtk-undo") -- ("etc/images/cut" . "gtk-cut") -- ("etc/images/copy" . "gtk-copy") -- ("etc/images/paste" . "gtk-paste") -- ("etc/images/search" . "gtk-find") -- ("etc/images/print" . "gtk-print") -- ("etc/images/preferences" . "gtk-preferences") -- ("etc/images/help" . "gtk-help") -- ("etc/images/left-arrow" . "gtk-go-back") -- ("etc/images/right-arrow" . "gtk-go-forward") -- ("etc/images/home" . "gtk-home") -- ("etc/images/jump-to" . "gtk-jump-to") -+ ("etc/images/close" . ("window-close" "gtk-close")) -+ ("etc/images/save" . ("document-save" "gtk-save")) -+ ("etc/images/saveas" . ("document-save-as" "gtk-save-as")) -+ ("etc/images/undo" . ("edit-undo" "gtk-undo")) -+ ("etc/images/cut" . ("edit-cut" "gtk-cut")) -+ ("etc/images/copy" . ("edit-copy" "gtk-copy")) -+ ("etc/images/paste" . ("edit-paste" "gtk-paste")) -+ ("etc/images/search" . ("edit-find" "gtk-find")) -+ ("etc/images/print" . ("document-print" "gtk-print")) -+ ("etc/images/preferences" . ("preferences-system" "gtk-preferences")) -+ ("etc/images/help" . ("help-browser" "gtk-help")) -+ ("etc/images/left-arrow" . ("go-previous" "gtk-go-back")) -+ ("etc/images/right-arrow" . ("go-next" "gtk-go-forward")) -+ ("etc/images/home" . ("go-home" "gtk-home")) -+ ("etc/images/jump-to" . ("go-jump" "gtk-jump-to")) - ("etc/images/index" . "gtk-index") -- ("etc/images/search" . "gtk-find") -- ("etc/images/exit" . "gtk-quit") -+ ("etc/images/exit" . ("application-exit" "gtk-quit")) - ("etc/images/cancel" . "gtk-cancel") -- ("etc/images/info" . "gtk-info") -+ ("etc/images/info" . ("dialog-information" "gtk-info")) - ("etc/images/bookmark_add" . "n:bookmark_add") - ;; Used in Gnus and/or MH-E: - ("etc/images/attach" . "gtk-attach") - ("etc/images/connect" . "gtk-connect") - ("etc/images/contact" . "gtk-contact") -- ("etc/images/delete" . "gtk-delete") -- ("etc/images/describe" . "gtk-properties") -+ ("etc/images/delete" . ("edit-delete" "gtk-delete")) -+ ("etc/images/describe" . ("ocument-properties" "gtk-properties")) - ("etc/images/disconnect" . "gtk-disconnect") - ;; ("etc/images/exit" . "gtk-exit") - ("etc/images/lock-broken" . "gtk-lock_broken") - ("etc/images/lock-ok" . "gtk-lock_ok") - ("etc/images/lock" . "gtk-lock") - ("etc/images/next-page" . "gtk-next-page") -- ("etc/images/refresh" . "gtk-refresh") -- ("etc/images/sort-ascending" . "gtk-sort-ascending") -+ ("etc/images/refresh" . ("view-refresh" "gtk-refresh")) -+ ("etc/images/sort-ascending" . ("view-sort-ascending" "gtk-sort-ascending")) - ("etc/images/sort-column-ascending" . "gtk-sort-column-ascending") - ("etc/images/sort-criteria" . "gtk-sort-criteria") -- ("etc/images/sort-descending" . "gtk-sort-descending") -+ ("etc/images/sort-descending" . ("view-sort-descending" -+ "gtk-sort-descending")) - ("etc/images/sort-row-ascending" . "gtk-sort-row-ascending") - ("images/gnus/toggle-subscription" . "gtk-task-recurring") - ("images/mail/compose" . "gtk-mail-compose") -@@ -1532,8 +1532,8 @@ - ("images/mail/spam" . "gtk-spam") - ;; Used for GDB Graphical Interface - ("images/gud/break" . "gtk-no") -- ("images/gud/recstart" . "gtk-media-record") -- ("images/gud/recstop" . "gtk-media-stop") -+ ("images/gud/recstart" . ("media-record" "gtk-media-record")) -+ ("images/gud/recstop" . ("media-playback-stop" "gtk-media-stop")) - ;; No themed versions available: - ;; mail/preview (combining stock_mail and stock_zoom) - ;; mail/save (combining stock_mail, stock_save and stock_convert) -@@ -1542,9 +1542,12 @@ - Emacs must be compiled with the Gtk+ toolkit for this to have any effect. - A value that begins with n: denotes a named icon instead of a stock icon." - :version "22.2" -- :type '(choice (repeat (choice symbol -- (cons (string :tag "Emacs icon") -- (string :tag "Stock/named"))))) -+ :type '(choice (repeat -+ (choice symbol -+ (cons (string :tag "Emacs icon") -+ (choice (group (string :tag "Named") -+ (string :tag "Stock")) -+ (string :tag "Stock/named")))))) - :group 'x) - - (defcustom icon-map-list '(x-gtk-stock-map) ---- emacs-24.5-orig/src/gtkutil.c -+++ emacs-24.5/src/gtkutil.c -@@ -92,6 +92,16 @@ - #endif - #endif /* HAVE_FREETYPE */ - -+#if GTK_CHECK_VERSION (3, 10, 0) -+#define XG_TEXT_CANCEL "Cancel" -+#define XG_TEXT_OK "OK" -+#define XG_TEXT_OPEN "Open" -+#else -+#define XG_TEXT_CANCEL GTK_STOCK_CANCEL -+#define XG_TEXT_OK GTK_STOCK_OK -+#define XG_TEXT_OPEN GTK_STOCK_OPEN -+#endif -+ - #ifndef HAVE_GTK3 - #ifdef USE_GTK_TOOLTIP - #define gdk_window_get_screen(w) gdk_drawable_get_screen (w) -@@ -1826,9 +1836,9 @@ - action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER; - - filewin = gtk_file_chooser_dialog_new (prompt, gwin, action, -- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, -+ XG_TEXT_CANCEL, GTK_RESPONSE_CANCEL, - (mustmatch_p || only_dir_p ? -- GTK_STOCK_OPEN : GTK_STOCK_OK), -+ XG_TEXT_OPEN : XG_TEXT_OK), - GTK_RESPONSE_OK, - NULL); - gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (filewin), TRUE); -@@ -2408,57 +2418,6 @@ - return w; - } - --#ifdef HAVE_GTK_TEAROFF_MENU_ITEM_NEW -- --static int xg_detached_menus; -- --/* Return true if there are detached menus. */ -- --bool --xg_have_tear_offs (struct frame *f) --{ -- /* If the frame's menubar height is zero, the menu bar is probably -- being redirected outside the window to some kind of global menu; -- this situation is the moral equivalent of a tear-off. */ -- return FRAME_MENUBAR_HEIGHT (f) == 0 || xg_detached_menus > 0; --} -- --/* Callback invoked when a detached menu window is removed. Here we -- decrease the xg_detached_menus count. -- WIDGET is the top level window that is removed (the parent of the menu). -- CLIENT_DATA is not used. */ -- --static void --tearoff_remove (GtkWidget *widget, gpointer client_data) --{ -- if (xg_detached_menus > 0) --xg_detached_menus; --} -- --/* Callback invoked when a menu is detached. It increases the -- xg_detached_menus count. -- WIDGET is the GtkTearoffMenuItem. -- CLIENT_DATA is not used. */ -- --static void --tearoff_activate (GtkWidget *widget, gpointer client_data) --{ -- GtkWidget *menu = gtk_widget_get_parent (widget); -- if (gtk_menu_get_tearoff_state (GTK_MENU (menu))) -- { -- ++xg_detached_menus; -- g_signal_connect (G_OBJECT (gtk_widget_get_toplevel (widget)), -- "destroy", -- G_CALLBACK (tearoff_remove), 0); -- } --} --#else /* ! HAVE_GTK_TEAROFF_MENU_ITEM_NEW */ --bool --xg_have_tear_offs (struct frame *f) --{ -- return FRAME_MENUBAR_HEIGHT (f) == 0; --} --#endif /* ! HAVE_GTK_TEAROFF_MENU_ITEM_NEW */ -- - /* Create a menu item widget, and connect the callbacks. - ITEM describes the menu item. - F is the frame the created menu belongs to. -@@ -2529,8 +2488,6 @@ - HIGHLIGHT_CB is the callback to call when entering/leaving menu items. - If POP_UP_P, create a popup menu. - If MENU_BAR_P, create a menu bar. -- If ADD_TEAROFF_P, add a tearoff menu item. Ignored if MENU_BAR_P or -- the Gtk+ version used does not have tearoffs. - TOPMENU is the topmost GtkWidget that others shall be placed under. - It may be NULL, in that case we create the appropriate widget - (menu bar or menu item depending on POP_UP_P and MENU_BAR_P) -@@ -2552,7 +2509,6 @@ - GCallback highlight_cb, - bool pop_up_p, - bool menu_bar_p, -- bool add_tearoff_p, - GtkWidget *topmenu, - xg_menu_cb_data *cl_data, - const char *name) -@@ -2603,17 +2559,6 @@ - "selection-done", deactivate_cb, 0); - } - --#ifdef HAVE_GTK_TEAROFF_MENU_ITEM_NEW -- if (! menu_bar_p && add_tearoff_p) -- { -- GtkWidget *tearoff = gtk_tearoff_menu_item_new (); -- gtk_menu_shell_append (GTK_MENU_SHELL (wmenu), tearoff); -- -- g_signal_connect (G_OBJECT (tearoff), "activate", -- G_CALLBACK (tearoff_activate), 0); -- } --#endif -- - for (item = data; item; item = item->next) - { - GtkWidget *w; -@@ -2627,7 +2572,6 @@ - group = NULL; - utf8_label = get_utf8_string (item->name); - -- gtk_menu_set_title (GTK_MENU (wmenu), utf8_label); - w = gtk_menu_item_new_with_label (utf8_label); - gtk_widget_set_sensitive (w, FALSE); - if (utf8_label) g_free (utf8_label); -@@ -2658,7 +2602,6 @@ - highlight_cb, - 0, - 0, -- add_tearoff_p, - 0, - cl_data, - 0); -@@ -2716,7 +2659,6 @@ - highlight_cb, - pop_up_p, - menu_bar_p, -- menu_bar_p, - 0, - 0, - name); -@@ -2826,7 +2768,7 @@ - { - /* Item(s) added. Add all new items in one call. */ - create_menus (val, f, select_cb, deactivate_cb, highlight_cb, -- 0, 1, 0, menubar, cl_data, 0); -+ 0, 1, menubar, cl_data, 0); - - /* All updated. */ - val = 0; -@@ -2899,7 +2841,6 @@ - is up to date when leaving the minibuffer. */ - GtkLabel *wlabel = GTK_LABEL (XG_BIN_CHILD (witem)); - char *utf8_label = get_utf8_string (val->name); -- GtkWidget *submenu = gtk_menu_item_get_submenu (witem); - - /* GTK menu items don't notice when their labels have been - changed from underneath them, so we have to explicitly -@@ -2909,14 +2850,6 @@ - gtk_label_set_text (wlabel, utf8_label); - g_object_notify (G_OBJECT (witem), "label"); - --#ifdef HAVE_GTK_TEAROFF_MENU_ITEM_NEW -- /* If this item has a submenu that has been detached, change -- the title in the WM decorations also. */ -- if (submenu && gtk_menu_get_tearoff_state (GTK_MENU (submenu))) -- /* Set the title of the detached window. */ -- gtk_menu_set_title (GTK_MENU (submenu), utf8_label); --#endif -- - if (utf8_label) g_free (utf8_label); - iter = g_list_next (iter); - val = val->next; -@@ -2943,7 +2876,7 @@ - GtkWidget *submenu = create_menus (NULL, f, - select_cb, deactivate_cb, - highlight_cb, -- 0, 0, 0, 0, cl_data, 0); -+ 0, 0, 0, cl_data, 0); - - gtk_widget_set_name (w, MENU_ITEM_NAME); - gtk_menu_shell_insert (GTK_MENU_SHELL (menubar), w, pos); -@@ -3140,7 +3073,6 @@ - GList *list = 0; - GList *iter; - widget_value *cur; -- bool has_tearoff_p = 0; - GList *first_radio = 0; - - if (submenu) -@@ -3152,17 +3084,6 @@ - { - GtkWidget *w = GTK_WIDGET (iter->data); - --#ifdef HAVE_GTK_TEAROFF_MENU_ITEM_NEW -- /* Skip tearoff items, they have no counterpart in val. */ -- if (GTK_IS_TEAROFF_MENU_ITEM (w)) -- { -- has_tearoff_p = 1; -- iter = g_list_next (iter); -- if (iter) w = GTK_WIDGET (iter->data); -- else break; -- } --#endif -- - /* Remember first radio button in a group. If we get a mismatch in - a radio group we must rebuild the whole group so that the connections - in GTK becomes correct. */ -@@ -3250,7 +3171,6 @@ - highlight_cb, - 0, - 0, -- ! has_tearoff_p, - submenu, - cl_data, - 0); -@@ -3908,9 +3828,6 @@ - get them. */ - #define XG_TOOL_BAR_LAST_MODIFIER "emacs-tool-bar-modifier" - --/* The key for storing the button widget in its proxy menu item. */ --#define XG_TOOL_BAR_PROXY_BUTTON "emacs-tool-bar-proxy-button" -- - /* The key for the data we put in the GtkImage widgets. The data is - the stock name used by Emacs. We use this to see if we need to update - the GtkImage with a new image. */ -@@ -3983,41 +3900,6 @@ - x_focus_frame (f); - } - --/* Callback function invoked when a tool bar item is pressed in a detached -- tool bar or the overflow drop down menu. -- We just call xg_tool_bar_callback. -- W is the menu item widget that got pressed, -- CLIENT_DATA is an integer that is the index of the button in the -- tool bar. 0 is the first button. */ -- --static void --xg_tool_bar_proxy_callback (GtkWidget *w, gpointer client_data) --{ -- GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w), -- XG_TOOL_BAR_PROXY_BUTTON)); -- xg_tool_bar_callback (wbutton, client_data); --} -- -- --static gboolean --xg_tool_bar_help_callback (GtkWidget *w, -- GdkEventCrossing *event, -- gpointer client_data); -- --/* This callback is called when a help is to be shown for an item in -- the detached tool bar when the detached tool bar it is not expanded. */ -- --static gboolean --xg_tool_bar_proxy_help_callback (GtkWidget *w, -- GdkEventCrossing *event, -- gpointer client_data) --{ -- GtkWidget *wbutton = GTK_WIDGET (g_object_get_data (G_OBJECT (w), -- XG_TOOL_BAR_PROXY_BUTTON)); -- -- return xg_tool_bar_help_callback (wbutton, event, client_data); --} -- - static GtkWidget * - xg_get_tool_bar_widgets (GtkWidget *vb, GtkWidget **wimage) - { -@@ -4031,187 +3913,6 @@ - } - - --/* This callback is called when a tool item should create a proxy item, -- such as for the overflow menu. Also called when the tool bar is detached. -- If we don't create a proxy menu item, the detached tool bar will be -- blank. */ -- --static gboolean --xg_tool_bar_menu_proxy (GtkToolItem *toolitem, gpointer user_data) --{ -- GtkButton *wbutton = GTK_BUTTON (XG_BIN_CHILD (XG_BIN_CHILD (toolitem))); -- GtkWidget *vb = XG_BIN_CHILD (wbutton); -- GtkWidget *c1; -- GtkLabel *wlbl = GTK_LABEL (xg_get_tool_bar_widgets (vb, &c1)); -- GtkImage *wimage = GTK_IMAGE (c1); -- GtkWidget *wmenuitem = gtk_image_menu_item_new_with_label -- (wlbl ? gtk_label_get_text (wlbl) : ""); -- GtkWidget *wmenuimage; -- -- -- if (gtk_button_get_use_stock (wbutton)) -- wmenuimage = gtk_image_new_from_stock (gtk_button_get_label (wbutton), -- GTK_ICON_SIZE_MENU); -- else -- { -- GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (wbutton)); -- GtkImageType store_type = gtk_image_get_storage_type (wimage); -- -- g_object_set (G_OBJECT (settings), "gtk-menu-images", TRUE, NULL); -- -- if (store_type == GTK_IMAGE_STOCK) -- { -- gchar *stock_id; -- gtk_image_get_stock (wimage, &stock_id, NULL); -- wmenuimage = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU); -- } -- else if (store_type == GTK_IMAGE_ICON_SET) -- { -- GtkIconSet *icon_set; -- gtk_image_get_icon_set (wimage, &icon_set, NULL); -- wmenuimage = gtk_image_new_from_icon_set (icon_set, -- GTK_ICON_SIZE_MENU); -- } -- else if (store_type == GTK_IMAGE_PIXBUF) -- { -- gint width, height; -- -- if (settings && -- gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_MENU, -- &width, &height)) -- { -- GdkPixbuf *src_pixbuf, *dest_pixbuf; -- -- src_pixbuf = gtk_image_get_pixbuf (wimage); -- dest_pixbuf = gdk_pixbuf_scale_simple (src_pixbuf, width, height, -- GDK_INTERP_BILINEAR); -- -- wmenuimage = gtk_image_new_from_pixbuf (dest_pixbuf); -- } -- else -- { -- fprintf (stderr, "internal error: GTK_IMAGE_PIXBUF failed\n"); -- emacs_abort (); -- } -- } -- else if (store_type == GTK_IMAGE_ICON_NAME) -- { -- const gchar *icon_name; -- GtkIconSize icon_size; -- -- gtk_image_get_icon_name (wimage, &icon_name, &icon_size); -- wmenuimage = gtk_image_new_from_icon_name (icon_name, -- GTK_ICON_SIZE_MENU); -- } -- else -- { -- fprintf (stderr, "internal error: store_type is %d\n", store_type); -- emacs_abort (); -- } -- } -- if (wmenuimage) -- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (wmenuitem), wmenuimage); -- -- g_signal_connect (G_OBJECT (wmenuitem), -- "activate", -- G_CALLBACK (xg_tool_bar_proxy_callback), -- user_data); -- -- -- g_object_set_data (G_OBJECT (wmenuitem), XG_TOOL_BAR_PROXY_BUTTON, -- (gpointer) wbutton); -- gtk_tool_item_set_proxy_menu_item (toolitem, "Emacs toolbar item", wmenuitem); -- gtk_widget_set_sensitive (wmenuitem, -- gtk_widget_get_sensitive (GTK_WIDGET (wbutton))); -- -- /* Use enter/leave notify to show help. We use the events -- rather than the GtkButton specific signals "enter" and -- "leave", so we can have only one callback. The event -- will tell us what kind of event it is. */ -- g_signal_connect (G_OBJECT (wmenuitem), -- "enter-notify-event", -- G_CALLBACK (xg_tool_bar_proxy_help_callback), -- user_data); -- g_signal_connect (G_OBJECT (wmenuitem), -- "leave-notify-event", -- G_CALLBACK (xg_tool_bar_proxy_help_callback), -- user_data); -- -- return TRUE; --} -- --/* This callback is called when a tool bar is detached. We must set -- the height of the tool bar to zero when this happens so frame sizes -- are correctly calculated. -- WBOX is the handle box widget that enables detach/attach of the tool bar. -- W is the tool bar widget. -- CLIENT_DATA is a pointer to the frame the tool bar belongs to. */ -- --static void --xg_tool_bar_detach_callback (GtkHandleBox *wbox, -- GtkWidget *w, -- gpointer client_data) --{ -- struct frame *f = client_data; -- -- g_object_set (G_OBJECT (w), "show-arrow", !x_gtk_whole_detached_tool_bar, -- NULL); -- -- if (f) -- { -- GtkRequisition req, req2; -- -- gtk_widget_get_preferred_size (GTK_WIDGET (wbox), NULL, &req); -- gtk_widget_get_preferred_size (w, NULL, &req2); -- req.width -= req2.width; -- req.height -= req2.height; -- if (FRAME_TOOLBAR_TOP_HEIGHT (f) != 0) -- FRAME_TOOLBAR_TOP_HEIGHT (f) = req.height; -- else if (FRAME_TOOLBAR_BOTTOM_HEIGHT (f) != 0) -- FRAME_TOOLBAR_BOTTOM_HEIGHT (f) = req.height; -- else if (FRAME_TOOLBAR_RIGHT_WIDTH (f) != 0) -- FRAME_TOOLBAR_RIGHT_WIDTH (f) = req.width; -- else if (FRAME_TOOLBAR_LEFT_WIDTH (f) != 0) -- FRAME_TOOLBAR_LEFT_WIDTH (f) = req.width; -- xg_height_or_width_changed (f); -- } --} -- --/* This callback is called when a tool bar is reattached. We must set -- the height of the tool bar when this happens so frame sizes -- are correctly calculated. -- WBOX is the handle box widget that enables detach/attach of the tool bar. -- W is the tool bar widget. -- CLIENT_DATA is a pointer to the frame the tool bar belongs to. */ -- --static void --xg_tool_bar_attach_callback (GtkHandleBox *wbox, -- GtkWidget *w, -- gpointer client_data) --{ -- struct frame *f = client_data; -- g_object_set (G_OBJECT (w), "show-arrow", TRUE, NULL); -- -- if (f) -- { -- GtkRequisition req, req2; -- -- gtk_widget_get_preferred_size (GTK_WIDGET (wbox), NULL, &req); -- gtk_widget_get_preferred_size (w, NULL, &req2); -- req.width += req2.width; -- req.height += req2.height; -- if (FRAME_TOOLBAR_TOP_HEIGHT (f) != 0) -- FRAME_TOOLBAR_TOP_HEIGHT (f) = req.height; -- else if (FRAME_TOOLBAR_BOTTOM_HEIGHT (f) != 0) -- FRAME_TOOLBAR_BOTTOM_HEIGHT (f) = req.height; -- else if (FRAME_TOOLBAR_RIGHT_WIDTH (f) != 0) -- FRAME_TOOLBAR_RIGHT_WIDTH (f) = req.width; -- else if (FRAME_TOOLBAR_LEFT_WIDTH (f) != 0) -- FRAME_TOOLBAR_LEFT_WIDTH (f) = req.width; -- xg_height_or_width_changed (f); -- } --} -- - /* This callback is called when the mouse enters or leaves a tool bar item. - It is used for displaying and hiding the help text. - W is the tool bar item, a button. -@@ -4291,12 +3992,6 @@ - gtk_toolbar_set_orientation (GTK_TOOLBAR (w), o) - #endif - --#ifdef HAVE_GTK_HANDLE_BOX_NEW --#define TOOLBAR_TOP_WIDGET(x) ((x)->handlebox_widget) --#else --#define TOOLBAR_TOP_WIDGET(x) ((x)->toolbar_widget) --#endif -- - /* Attach a tool bar to frame F. */ - - static void -@@ -4304,31 +3999,15 @@ - { - struct x_output *x = f->output_data.x; - bool into_hbox = EQ (pos, Qleft) || EQ (pos, Qright); -- GtkWidget *top_widget = TOOLBAR_TOP_WIDGET (x); -+ GtkWidget *top_widget = x->toolbar_widget; - - toolbar_set_orientation (x->toolbar_widget, - into_hbox - ? GTK_ORIENTATION_VERTICAL - : GTK_ORIENTATION_HORIZONTAL); --#ifdef HAVE_GTK_HANDLE_BOX_NEW -- if (!x->handlebox_widget) -- { -- top_widget = x->handlebox_widget = gtk_handle_box_new (); -- g_signal_connect (G_OBJECT (x->handlebox_widget), "child-detached", -- G_CALLBACK (xg_tool_bar_detach_callback), f); -- g_signal_connect (G_OBJECT (x->handlebox_widget), "child-attached", -- G_CALLBACK (xg_tool_bar_attach_callback), f); -- gtk_container_add (GTK_CONTAINER (x->handlebox_widget), -- x->toolbar_widget); -- } --#endif - - if (into_hbox) - { --#ifdef HAVE_GTK_HANDLE_BOX_NEW -- gtk_handle_box_set_handle_position (GTK_HANDLE_BOX (x->handlebox_widget), -- GTK_POS_TOP); --#endif - gtk_box_pack_start (GTK_BOX (x->hbox_widget), top_widget, - FALSE, FALSE, 0); - -@@ -4341,10 +4020,6 @@ - else - { - bool vbox_pos = x->menubar_widget != 0; --#ifdef HAVE_GTK_HANDLE_BOX_NEW -- gtk_handle_box_set_handle_position (GTK_HANDLE_BOX (x->handlebox_widget), -- GTK_POS_LEFT); --#endif - gtk_box_pack_start (GTK_BOX (x->vbox_widget), top_widget, - FALSE, FALSE, 0); - -@@ -4497,10 +4172,6 @@ - intptr_t ii = i; - gpointer gi = (gpointer) ii; - -- g_signal_connect (G_OBJECT (ti), "create-menu-proxy", -- G_CALLBACK (xg_tool_bar_menu_proxy), -- gi); -- - g_signal_connect (G_OBJECT (wb), "clicked", - G_CALLBACK (xg_tool_bar_callback), - gi); -@@ -4614,7 +4285,7 @@ - struct x_output *x = f->output_data.x; - GtkRequisition req; - int nl = 0, nr = 0, nt = 0, nb = 0; -- GtkWidget *top_widget = TOOLBAR_TOP_WIDGET (x); -+ GtkWidget *top_widget = x->toolbar_widget; - - gtk_widget_get_preferred_size (GTK_WIDGET (top_widget), NULL, &req); - if (x->toolbar_in_hbox) -@@ -4653,6 +4324,42 @@ - return 0; - } - -+static char * -+find_icon_from_name (char *name, -+ GtkIconTheme *icon_theme, -+ char **icon_name) -+{ -+#if ! GTK_CHECK_VERSION (3, 10, 0) -+ GtkStockItem stock_item; -+#endif -+ -+ if (name[0] == 'n' && name[1] == ':') -+ { -+ *icon_name = name + 2; -+ name = NULL; -+ -+ if (! gtk_icon_theme_has_icon (icon_theme, *icon_name)) -+ *icon_name = NULL; -+ } -+ -+#if ! GTK_CHECK_VERSION (3, 10, 0) -+ else if (gtk_stock_lookup (name, &stock_item)) -+ *icon_name = NULL; -+#endif -+ else if (gtk_icon_theme_has_icon (icon_theme, name)) -+ { -+ *icon_name = name; -+ name = NULL; -+ } -+ else -+ { -+ name = NULL; -+ *icon_name = NULL; -+ } -+ -+ return name; -+} -+ - - /* Update the tool bar for frame F. Add new buttons and remove old. */ - -@@ -4668,6 +4375,9 @@ - Lisp_Object style; - bool text_image, horiz; - struct xg_frame_tb_info *tbinfo; -+ GdkScreen *screen; -+ GtkIconTheme *icon_theme; -+ - - if (! FRAME_GTK_WIDGET (f)) - return; -@@ -4702,6 +4412,8 @@ - dir = gtk_widget_get_direction (GTK_WIDGET (wtoolbar)); - - style = Ftool_bar_get_system_style (); -+ screen = gtk_widget_get_screen (GTK_WIDGET (wtoolbar)); -+ icon_theme = gtk_icon_theme_get_for_screen (screen); - - /* Are we up to date? */ - tbinfo = g_object_get_data (G_OBJECT (FRAME_GTK_OUTER_WIDGET (f)), -@@ -4738,7 +4450,6 @@ - struct image *img = NULL; - Lisp_Object image; - Lisp_Object stock = Qnil; -- GtkStockItem stock_item; - char *stock_name = NULL; - char *icon_name = NULL; - Lisp_Object rtl; -@@ -4792,32 +4503,28 @@ - if (!NILP (specified_file) && !NILP (Ffboundp (Qx_gtk_map_stock))) - stock = call1 (Qx_gtk_map_stock, specified_file); - -- if (STRINGP (stock)) -+ if (CONSP (stock)) - { -- stock_name = SSDATA (stock); -- if (stock_name[0] == 'n' && stock_name[1] == ':') -- { -- GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (wtoolbar)); -- GtkIconTheme *icon_theme = gtk_icon_theme_get_for_screen (screen); -- -- icon_name = stock_name + 2; -- stock_name = NULL; -- stock = Qnil; -- -- if (! gtk_icon_theme_has_icon (icon_theme, icon_name)) -- icon_name = NULL; -- else -- icon_size = gtk_toolbar_get_icon_size (wtoolbar); -- } -- else if (gtk_stock_lookup (SSDATA (stock), &stock_item)) -- icon_size = gtk_toolbar_get_icon_size (wtoolbar); -- else -- { -- stock = Qnil; -- stock_name = NULL; -- } -+ Lisp_Object tem; -+ for (tem = stock; CONSP (tem); tem = XCDR (tem)) -+ if (! NILP (tem) && STRINGP (XCAR (tem))) -+ { -+ stock_name = find_icon_from_name (SSDATA (XCAR (tem)), -+ icon_theme, -+ &icon_name); -+ if (stock_name || icon_name) break; -+ } -+ } -+ else if (STRINGP (stock)) -+ { -+ stock_name = find_icon_from_name (SSDATA (stock), -+ icon_theme, -+ &icon_name); - } - -+ if (stock_name || icon_name) -+ icon_size = gtk_toolbar_get_icon_size (wtoolbar); -+ - if (stock_name == NULL && icon_name == NULL) - { - /* No stock image, or stock item not known. Try regular -@@ -4878,7 +4585,12 @@ - w = NULL; - else if (stock_name) - { -+ -+#if GTK_CHECK_VERSION (3, 10, 0) -+ w = gtk_image_new_from_icon_name (stock_name, icon_size); -+#else - w = gtk_image_new_from_stock (stock_name, icon_size); -+#endif - g_object_set_data_full (G_OBJECT (w), XG_TOOL_BAR_STOCK_NAME, - (gpointer) xstrdup (stock_name), - (GDestroyNotify) xfree); -@@ -4920,7 +4632,7 @@ - { - if (! x->toolbar_is_packed) - xg_pack_tool_bar (f, f->tool_bar_position); -- gtk_widget_show_all (TOOLBAR_TOP_WIDGET (x)); -+ gtk_widget_show_all (x->toolbar_widget); - if (xg_update_tool_bar_sizes (f)) - xg_height_or_width_changed (f); - } -@@ -4939,11 +4651,9 @@ - if (x->toolbar_widget) - { - struct xg_frame_tb_info *tbinfo; -- GtkWidget *top_widget = TOOLBAR_TOP_WIDGET (x); -+ GtkWidget *top_widget = x->toolbar_widget; - - block_input (); -- /* We may have created the toolbar_widget in xg_create_tool_bar, but -- not the x->handlebox_widget which is created in xg_pack_tool_bar. */ - if (x->toolbar_is_packed) - { - if (x->toolbar_in_hbox) -@@ -4957,7 +4667,7 @@ - gtk_widget_destroy (x->toolbar_widget); - - x->toolbar_widget = 0; -- TOOLBAR_TOP_WIDGET (x) = 0; -+ x->toolbar_widget = 0; - x->toolbar_is_packed = false; - FRAME_TOOLBAR_TOP_HEIGHT (f) = FRAME_TOOLBAR_BOTTOM_HEIGHT (f) = 0; - FRAME_TOOLBAR_LEFT_WIDTH (f) = FRAME_TOOLBAR_RIGHT_WIDTH (f) = 0; -@@ -4982,7 +4692,7 @@ - xg_change_toolbar_position (struct frame *f, Lisp_Object pos) - { - struct x_output *x = f->output_data.x; -- GtkWidget *top_widget = TOOLBAR_TOP_WIDGET (x); -+ GtkWidget *top_widget = x->toolbar_widget; - - if (! x->toolbar_widget || ! top_widget) - return; -@@ -5026,9 +4736,6 @@ - - gdpy_def = NULL; - xg_ignore_gtk_scrollbar = 0; --#ifdef HAVE_GTK_TEAROFF_MENU_ITEM_NEW -- xg_detached_menus = 0; --#endif - xg_menu_cb_list.prev = xg_menu_cb_list.next = - xg_menu_item_cb_list.prev = xg_menu_item_cb_list.next = 0; - ---- emacs-24.5-orig/src/gtkutil.h -+++ emacs-24.5/src/gtkutil.h -@@ -107,8 +107,6 @@ - - extern bool xg_event_is_for_menubar (struct frame *, const XEvent *); - --extern bool xg_have_tear_offs (struct frame *f); -- - extern ptrdiff_t xg_get_scroll_id_for_window (Display *dpy, Window wid); - - extern void xg_create_scroll_bar (struct frame *f, ---- emacs-24.5-orig/src/xfns.c -+++ emacs-24.5/src/xfns.c -@@ -6221,12 +6221,6 @@ - to turn the additional text off. */); - x_gtk_file_dialog_help_text = 1; - -- DEFVAR_BOOL ("x-gtk-whole-detached-tool-bar", x_gtk_whole_detached_tool_bar, -- doc: /* If non-nil, a detached tool bar is shown in full. --The default is to just show an arrow and pressing on that arrow shows --the tool bar buttons. */); -- x_gtk_whole_detached_tool_bar = 0; -- - DEFVAR_BOOL ("x-gtk-use-system-tooltips", x_gtk_use_system_tooltips, - doc: /* If non-nil with a Gtk+ built Emacs, the Gtk+ tooltip is used. - Otherwise use Emacs own tooltip implementation. ---- emacs-24.5-orig/src/xmenu.c -+++ emacs-24.5/src/xmenu.c -@@ -793,12 +793,6 @@ - f->output_data.x->saved_menu_event->type = 0; - } - --#ifdef USE_GTK -- /* If we have detached menus, we must update deep so detached menus -- also gets updated. */ -- deep_p = deep_p || xg_have_tear_offs (f); --#endif -- - if (deep_p) - { - /* Make a widget-value tree representing the entire menu trees. */ ---- emacs-24.5-orig/src/xterm.h -+++ emacs-24.5/src/xterm.h -@@ -491,10 +491,6 @@ - GtkWidget *menubar_widget; - /* The tool bar in this frame */ - GtkWidget *toolbar_widget; --#ifdef HAVE_GTK_HANDLE_BOX_NEW --/* The handle box that makes the tool bar detachable. */ -- GtkWidget *handlebox_widget; --#endif - /* True if tool bar is packed into the hbox widget (i.e. vertical). */ - bool_bf toolbar_in_hbox : 1; - bool_bf toolbar_is_packed : 1; diff --git a/emacs/24.5/07_all_gmalloc.patch b/emacs/24.5/07_all_gmalloc.patch deleted file mode 100644 index 7698ee3..0000000 --- a/emacs/24.5/07_all_gmalloc.patch +++ /dev/null @@ -1,81 +0,0 @@ -Fix temacs segmentation fault due to endless calloc loop. -https://bugs.gentoo.org/609680 - -Backported from Emacs 25: - -commit 4b1436b702d56eedd27a0777fc7232cdfb7ac4f6 -Author: Wolfgang Jenkner -Date: Sat Dec 26 12:12:02 2015 -0800 - - Always define gmalloc etc. in src/gmalloc.c - - This is a work-around to prevent the compiler from using semantic - knowledge about malloc for optimization purposes. E.g., gcc 5.2 - with -O2 replaces most of calloc's definition by a call to calloc; - see Bug#22085. - * src/gmalloc.c [!HYBRID_MALLOC] (malloc, realloc, calloc) - (aligned_alloc, free): Do not undef. Instead, define these as - functions (perhaps renamed to gmalloc etc.) in terms of gmalloc etc. - ---- emacs-24.5-orig/src/gmalloc.c -+++ emacs-24.5/src/gmalloc.c -@@ -42,6 +42,16 @@ - extern void emacs_abort (void); - #endif - -+#undef malloc -+#undef realloc -+#undef calloc -+#undef free -+#define malloc gmalloc -+#define realloc grealloc -+#define calloc gcalloc -+#define aligned_alloc galigned_alloc -+#define free gfree -+ - #ifdef __cplusplus - extern "C" - { -@@ -1747,6 +1757,42 @@ - return aligned_alloc (pagesize, size); - } - -+#undef malloc -+#undef realloc -+#undef calloc -+#undef aligned_alloc -+#undef free -+ -+void * -+malloc (size_t size) -+{ -+ return gmalloc (size); -+} -+ -+void * -+calloc (size_t nmemb, size_t size) -+{ -+ return gcalloc (nmemb, size); -+} -+ -+void -+free (void *ptr) -+{ -+ gfree (ptr); -+} -+ -+void * -+aligned_alloc (size_t alignment, size_t size) -+{ -+ return galigned_alloc (alignment, size); -+} -+ -+void * -+realloc (void *ptr, size_t size) -+{ -+ return grealloc (ptr, size); -+} -+ - #ifdef GC_MCHECK - - /* Standard debugging hooks for `malloc'. diff --git a/emacs/24.5/08_all_enriched-mode.patch b/emacs/24.5/08_all_enriched-mode.patch deleted file mode 100644 index 4979b5e..0000000 --- a/emacs/24.5/08_all_enriched-mode.patch +++ /dev/null @@ -1,78 +0,0 @@ -Fix security vulnerability in enriched mode. -https://bugs.gentoo.org/630680 - -Backported from Emacs 25: - -commit 9ad0fcc54442a9a01d41be19880250783426db70 -Author: Lars Ingebrigtsen -Date: Fri Sep 8 20:23:31 2017 -0700 - - Remove unsafe enriched mode translations - - * lisp/gnus/mm-view.el (mm-inline-text): - Do not worry about enriched or richtext type. - * lisp/textmodes/enriched.el (enriched-translations): - Remove translations for FUNCTION, display (Bug#28350). - (enriched-handle-display-prop, enriched-decode-display-prop): Remove. - ---- emacs-24.5-orig/lisp/gnus/mm-view.el -+++ emacs-24.5/lisp/gnus/mm-view.el -@@ -472,10 +472,6 @@ - (goto-char (point-max)))) - (save-restriction - (narrow-to-region b (point)) -- (when (member type '("enriched" "richtext")) -- (set-text-properties (point-min) (point-max) nil) -- (ignore-errors -- (enriched-decode (point-min) (point-max)))) - (mm-handle-set-undisplayer - handle - `(lambda () ---- emacs-24.5-orig/lisp/textmodes/enriched.el -+++ emacs-24.5/lisp/textmodes/enriched.el -@@ -117,12 +117,7 @@ - (full "flushboth") - (center "center")) - (PARAMETER (t "param")) ; Argument of preceding annotation -- ;; The following are not part of the standard: -- (FUNCTION (enriched-decode-foreground "x-color") -- (enriched-decode-background "x-bg-color") -- (enriched-decode-display-prop "x-display")) - (read-only (t "x-read-only")) -- (display (nil enriched-handle-display-prop)) - (unknown (nil format-annotate-value)) - ; (font-size (2 "bigger") ; unimplemented - ; (-2 "smaller")) -@@ -476,32 +471,5 @@ - (message "Warning: no color specified for ") - nil)) - --;;; Handling the `display' property. -- -- --(defun enriched-handle-display-prop (old new) -- "Return a list of annotations for a change in the `display' property. --OLD is the old value of the property, NEW is the new value. Value --is a list `(CLOSE OPEN)', where CLOSE is a list of annotations to --close and OPEN a list of annotations to open. Each of these lists --has the form `(ANNOTATION PARAM ...)'." -- (let ((annotation "x-display") -- (param (prin1-to-string (or old new)))) -- (if (null old) -- (cons nil (list (list annotation param))) -- (cons (list (list annotation param)) nil)))) -- --(defun enriched-decode-display-prop (start end &optional param) -- "Decode a `display' property for text between START and END. --PARAM is a `' found for the property. --Value is a list `(START END SYMBOL VALUE)' with START and END denoting --the range of text to assign text property SYMBOL with value VALUE." -- (let ((prop (when (stringp param) -- (condition-case () -- (car (read-from-string param)) -- (error nil))))) -- (unless prop -- (message "Warning: invalid parameter %s" param)) -- (list start end 'display prop))) - - ;;; enriched.el ends here diff --git a/emacs/24.5/09_all_imagemagick-7.patch b/emacs/24.5/09_all_imagemagick-7.patch deleted file mode 100644 index 73babef..0000000 --- a/emacs/24.5/09_all_imagemagick-7.patch +++ /dev/null @@ -1,101 +0,0 @@ -Support ImageMagick version 7. -https://bugs.gentoo.org/665058 -https://debbugs.gnu.org/25967 - -This backports and consolidates the following commits from upstream git: - -commit 3cc42bb60099c32f64e57d2ee33c8321adba7942 -Author: Glenn Morris -Date: Thu Aug 30 13:56:08 2018 -0400 - - * configure.ac: Fix goofs in my recent ImageMagick change. - -commit 42ed35c68b7c199aa797e655fdc3547c5c3087d2 -Author: Paul Eggert -Date: Thu Aug 30 10:03:43 2018 -0700 - - Pacify -Wdouble-promotion in ImageMagick code - -commit bf1b147b55e1328efca6e40181e79dd9a369895d -Author: Glenn Morris -Date: Mon Aug 27 22:03:25 2018 -0400 - - * configure.ac, src/image.c: Tweak previous ImageMagick change. - -commit 5729486951e6a60db55ea17ee3bac9baf8b54f6a -Author: Karl Otness -Date: Mon Aug 27 21:57:44 2018 -0400 - - Support ImageMagick version 7 (bug#25967) - -commit 686b520ff9ae25f9fa293a92e65b9331e192d142 -Author: Andreas Schwab -Date: Sun Jul 10 20:18:44 2016 +0200 - - Fix memory leak in imagemagick-types - ---- emacs-24.5-orig/configure.ac -+++ emacs-24.5/configure.ac -@@ -2270,10 +2270,14 @@ - HAVE_IMAGEMAGICK=no - if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes"; then - if test "${with_imagemagick}" != "no"; then -- ## 6.3.5 is the earliest version known to work; see Bug#17339. -- ## 6.8.2 makes Emacs crash; see Bug#13867. -- IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2" -- PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :) -+ PKG_CHECK_MODULES(IMAGEMAGICK, MagickWand >= 7, HAVE_IMAGEMAGICK=yes, :) -+ if test $HAVE_IMAGEMAGICK = yes; then -+ AC_DEFINE([HAVE_IMAGEMAGICK7], 1, [Define to 1 if using ImageMagick7.]) -+ else -+ ## 6.3.5 is the earliest version known to work; see Bug#17339. -+ ## 6.8.2 makes Emacs crash; see Bug#13867. -+ PKG_CHECK_MODULES(IMAGEMAGICK, Wand >= 6.3.5 Wand != 6.8.2, HAVE_IMAGEMAGICK=yes, :) -+ fi - AC_SUBST(IMAGEMAGICK_CFLAGS) - AC_SUBST(IMAGEMAGICK_LIBS) - ---- emacs-24.5-orig/src/image.c -+++ emacs-24.5/src/image.c -@@ -7909,11 +7909,20 @@ - /* The GIF library also defines DrawRectangle, but its never used in Emacs. - Therefore rename the function so it doesn't collide with ImageMagick. */ - #define DrawRectangle DrawRectangleGif --#include -+ -+#ifdef HAVE_IMAGEMAGICK7 -+# include -+# include -+/* ImageMagick 7 compatibility definitions. */ -+# define PixelSetMagickColor PixelSetPixelColor -+typedef PixelInfo MagickPixelPacket; -+#else -+# include -+# include -+#endif - - /* ImageMagick 6.5.3 through 6.6.5 hid PixelGetMagickColor for some reason. - Emacs seems to work fine with the hidden version, so unhide it. */ --#include - #if 0x653 <= MagickLibVersion && MagickLibVersion <= 0x665 - extern WandExport void PixelGetMagickColor (const PixelWand *, - MagickPixelPacket *); -@@ -8563,14 +8572,14 @@ - { - Lisp_Object typelist = Qnil; - size_t numf = 0; -- ExceptionInfo ex; -+ ExceptionInfo *ex; - char **imtypes; - size_t i; - Lisp_Object Qimagemagicktype; - -- GetExceptionInfo(&ex); -- imtypes = GetMagickList ("*", &numf, &ex); -- DestroyExceptionInfo(&ex); -+ ex = AcquireExceptionInfo (); -+ imtypes = GetMagickList ("*", &numf, ex); -+ DestroyExceptionInfo (ex); - - for (i = 0; i < numf; i++) - { -- cgit v1.2.3-65-gdbad