Hello community, here is the log from the commit of package emacs checked in at Thu May 17 11:30:44 CEST 2007. -------- --- emacs/emacs.changes 2007-03-29 19:59:16.000000000 +0200 +++ /mounts/work_src_done/STABLE/emacs/emacs.changes 2007-05-15 15:55:15.373842000 +0200 @@ -1,0 +2,5 @@ +Tue May 15 15:54:22 CEST 2007 - werner@suse.de + +- Use stdarg(3) instead of guessing argument pointers (bug #273211) + +------------------------------------------------------------------- New: ---- emacs-21.3-format1.dif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ emacs.spec ++++++ --- /var/tmp/diff_new_pack.nd8188/_old 2007-05-17 11:30:13.000000000 +0200 +++ /var/tmp/diff_new_pack.nd8188/_new 2007-05-17 11:30:13.000000000 +0200 @@ -20,7 +20,7 @@ Provides: ge_site ge_exec Autoreqprov: on Version: 21.3 -Release: 268 +Release: 279 BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: GNU Emacs Base Package Source: emacs-21.3.tar.bz2 @@ -48,6 +48,7 @@ Patch18: emacs-21.3-movemail.patch Patch19: emacs-21.3-sentinel.patch Patch20: emacs-21.3-xim.patch +Patch21: emacs-21.3-format1.dif %{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)} %if "%_exec_prefix" == "/usr/X11R6" %define _x11lib %{_exec_prefix}/%{_lib} @@ -219,6 +220,7 @@ %patch18 -p1 -b .movemail %patch19 -p0 -b .gcc4 %patch20 -p0 -b .xim +%patch21 -p0 -b .fmt1 %patch %patch12 -p0 -b .ppc @@ -2398,6 +2400,8 @@ /usr/share/emacs/%{version}/lisp/xt-mouse.el %changelog +* Tue May 15 2007 - werner@suse.de +- Use stdarg(3) instead of guessing argument pointers (bug #273211) * Thu Mar 29 2007 - aj@suse.de - Add ncurses-devel to BuildRequires. * Fri Jan 12 2007 - werner@suse.de ++++++ emacs-21.3-format1.dif ++++++ --- src/lisp.h +++ src/lisp.h 2007-05-15 13:43:33.195341769 +0000 @@ -2402,7 +2402,11 @@ EXFUN (Fbolp, 0); EXFUN (Fbobp, 0); EXFUN (Fformat, MANY); EXFUN (Fmessage, MANY); +#ifdef NO_ARG_ARRAY extern Lisp_Object format1 P_ ((/* char *, ... */)); +#else +extern Lisp_Object format1 P_ ((char *, ...)); +#endif extern Lisp_Object make_buffer_string P_ ((int, int, int)); EXFUN (Fbuffer_substring, 2); EXFUN (Fbuffer_string, 0); --- src/editfns.c +++ src/editfns.c 2007-05-15 13:41:46.023982028 +0000 @@ -20,6 +20,7 @@ the Free Software Foundation, Inc., 59 T Boston, MA 02111-1307, USA. */ +#include <stdarg.h> #include <config.h> #include <sys/types.h> @@ -3517,11 +3518,11 @@ Use %% to put a single % into the output Lisp_Object #ifdef NO_ARG_ARRAY format1 (string1, arg0, arg1, arg2, arg3, arg4) + char *string1; EMACS_INT arg0, arg1, arg2, arg3, arg4; #else -format1 (string1) +format1 (char *string1, ...) #endif - char *string1; { char buf[100]; #ifdef NO_ARG_ARRAY @@ -3533,7 +3534,32 @@ format1 (string1) args[4] = arg4; doprnt (buf, sizeof buf, string1, (char *)0, 5, (char **) args); #else - doprnt (buf, sizeof buf, string1, (char *)0, 5, &string1 + 1); + const char *fmt = string1; + int nargs = 0; + long args[5]; + va_list ap; + + va_start(ap, string1); + while (*fmt && nargs < 5) { + if (*fmt++ == '%') { + void *va = NULL; + switch (*fmt) { + case 's': + va = (void*)va_arg(ap, char*); + break; + case 'd': + case 'c': + va = (void*)va_arg(ap, int); + break; + default: + break; + } + if (va) + args[nargs++] = (long)va; + } + } + va_end(ap); + doprnt (buf, sizeof buf, string1, string1 + strlen(string1), nargs, (char **)args); #endif return build_string (buf); } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de