To: vim-dev@vim.org Subject: Patch 6.1.279 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.279 Problem: The prototype for smsg() and smsg_attr() do not match the function definition. This may cause trouble for some compilers. (Nix) Solution: Use va_list for systems that have stdarg.h. Use "int" instead of "void" for the return type. Files: src/auto/configure, src/config.h.in, src/configure.in, src/proto.h, src/message.c *** ../vim61.278/src/auto/configure Thu Jan 2 21:33:00 2003 --- src/auto/configure Mon Jan 6 21:30:20 2003 *************** *** 4706,4713 **** rm -f conftest* fi ! for ac_hdr in stdlib.h string.h sys/select.h sys/utsname.h termcap.h \ ! fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \ iconv.h langinfo.h unistd.h stropts.h errno.h strings.h \ sys/resource.h sys/systeminfo.h locale.h \ sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \ --- 4706,4713 ---- rm -f conftest* fi ! for ac_hdr in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \ ! termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \ iconv.h langinfo.h unistd.h stropts.h errno.h strings.h \ sys/resource.h sys/systeminfo.h locale.h \ sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \ *** ../vim61.278/src/config.h.in Sun Oct 13 20:08:13 2002 --- src/config.h.in Mon Jan 6 21:28:12 2003 *************** *** 254,259 **** --- 242,248 ---- /* #undef STDC_HEADERS */ /* instead, we check a few STDC things ourselves */ + #undef HAVE_STDARG_H #undef HAVE_STDLIB_H #undef HAVE_STRING_H *** ../vim61.278/src/configure.in Thu Jan 2 21:33:00 2003 --- src/configure.in Mon Jan 6 21:27:25 2003 *************** *** 1391,1398 **** AC_MSG_RESULT(no)) fi ! AC_CHECK_HEADERS(stdlib.h string.h sys/select.h sys/utsname.h termcap.h \ ! fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \ iconv.h langinfo.h unistd.h stropts.h errno.h strings.h \ sys/resource.h sys/systeminfo.h locale.h \ sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \ --- 1391,1398 ---- AC_MSG_RESULT(no)) fi ! AC_CHECK_HEADERS(stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \ ! termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \ iconv.h langinfo.h unistd.h stropts.h errno.h strings.h \ sys/resource.h sys/systeminfo.h locale.h \ sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \ *** ../vim61.278/src/proto.h Thu Aug 16 22:20:55 2001 --- src/proto.h Mon Jan 6 21:29:44 2003 *************** *** 85,97 **** # endif # include "main.pro" # include "mark.pro" ! # ifndef MESSAGE_FILE ! void #ifdef __BORLANDC__ _RTLENTRYF #endif ! smsg __ARGS((char_u *, ...)); /* cannot be produced automatically */ ! void #ifdef __BORLANDC__ _RTLENTRYF #endif --- 85,99 ---- # endif # include "main.pro" # include "mark.pro" ! # if !defined MESSAGE_FILE || defined(HAVE_STDARG_H) ! /* These prototypes cannot be produced automatically and conflict with ! * the old-style prototypes in message.c. */ ! int #ifdef __BORLANDC__ _RTLENTRYF #endif ! smsg __ARGS((char_u *, ...)); ! int #ifdef __BORLANDC__ _RTLENTRYF #endif *** ../vim61.278/src/message.c Sun Oct 13 20:08:14 2002 --- src/message.c Mon Jan 6 21:29:05 2003 *************** *** 15,21 **** #include "vim.h" ! #ifdef __QNX__ # include #endif --- 15,21 ---- #include "vim.h" ! #ifdef HAVE_STDARG_H # include #endif *************** *** 288,294 **** * shorter than IOSIZE!!! */ #ifndef PROTO ! # ifndef __QNX__ int #ifdef __BORLANDC__ --- 288,294 ---- * shorter than IOSIZE!!! */ #ifndef PROTO ! # ifndef HAVE_STDARG_H int #ifdef __BORLANDC__ *************** *** 329,337 **** return msg_attr(IObuff, attr); } ! # else /* __QNX__ */ int smsg(char_u *s, ...) { va_list arglist; --- 329,340 ---- return msg_attr(IObuff, attr); } ! # else /* HAVE_STDARG_H */ int + #ifdef __BORLANDC__ + _RTLENTRYF + #endif smsg(char_u *s, ...) { va_list arglist; *************** *** 343,348 **** --- 346,354 ---- } int + #ifdef __BORLANDC__ + _RTLENTRYF + #endif smsg_attr(int attr, char_u *s, ...) { va_list arglist; *************** *** 353,359 **** return msg_attr(IObuff, attr); } ! # endif /* __QNX__ */ #endif /* --- 359,365 ---- return msg_attr(IObuff, attr); } ! # endif /* HAVE_STDARG_H */ #endif /* *** ../vim61.278/src/version.c Mon Jan 6 20:19:10 2003 --- src/version.c Mon Jan 6 21:53:17 2003 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 279, /**/ -- GUARD #2: It could be carried by an African swallow! GUARD #1: Oh, yeah, an African swallow maybe, but not a European swallow, that's my point. GUARD #2: Oh, yeah, I agree with that... The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///