]> granicus.if.org Git - vim/commitdiff
patch 7.4.1216 v7.4.1216
authorBram Moolenaar <Bram@vim.org>
Sat, 30 Jan 2016 20:48:49 +0000 (21:48 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 30 Jan 2016 20:48:49 +0000 (21:48 +0100)
Problem:    Still using HAVE_STDARG_H.
Solution:   Assume it's always defined.

src/auto/configure
src/eval.c
src/misc2.c
src/os_amiga.h
src/os_msdos.h
src/os_vms_conf.h
src/os_win32.h
src/proto.h
src/version.c
src/vim.h

index 8dfecaf285534cd65a2d58bf53ce24120d7d1877..967a56882922176beaf3acc86d104bd1b911594e 100755 (executable)
@@ -10064,7 +10064,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-for ac_header in stdarg.h stdint.h stdlib.h string.h \
+for ac_header in stdint.h stdlib.h string.h \
        sys/select.h sys/utsname.h termcap.h fcntl.h \
        sgtty.h sys/ioctl.h sys/time.h sys/types.h \
        termio.h iconv.h inttypes.h langinfo.h math.h \
index fc512aba93f38e3581fe977e55ba0299182d61ac..90fa53a1149329cc66ad0b3745b5303c43e56fd7 100644 (file)
@@ -15217,13 +15217,11 @@ f_prevnonblank(typval_T *argvars, typval_T *rettv)
     rettv->vval.v_number = lnum;
 }
 
-#ifdef HAVE_STDARG_H
 /* This dummy va_list is here because:
  * - passing a NULL pointer doesn't work when va_list isn't a pointer
  * - locally in the function results in a "used before set" warning
  * - using va_start() to initialize it gives "function with fixed args" error */
 static va_list ap;
-#endif
 
 /*
  * "printf()" function
@@ -15231,32 +15229,29 @@ static va_list        ap;
     static void
 f_printf(typval_T *argvars, typval_T *rettv)
 {
+    char_u     buf[NUMBUFLEN];
+    int                len;
+    char_u     *s;
+    int                saved_did_emsg = did_emsg;
+    char       *fmt;
+
     rettv->v_type = VAR_STRING;
     rettv->vval.v_string = NULL;
-#ifdef HAVE_STDARG_H       /* only very old compilers can't do this */
-    {
-       char_u  buf[NUMBUFLEN];
-       int     len;
-       char_u  *s;
-       int     saved_did_emsg = did_emsg;
-       char    *fmt;
 
-       /* Get the required length, allocate the buffer and do it for real. */
-       did_emsg = FALSE;
-       fmt = (char *)get_tv_string_buf(&argvars[0], buf);
-       len = vim_vsnprintf(NULL, 0, fmt, ap, argvars + 1);
-       if (!did_emsg)
+    /* Get the required length, allocate the buffer and do it for real. */
+    did_emsg = FALSE;
+    fmt = (char *)get_tv_string_buf(&argvars[0], buf);
+    len = vim_vsnprintf(NULL, 0, fmt, ap, argvars + 1);
+    if (!did_emsg)
+    {
+       s = alloc(len + 1);
+       if (s != NULL)
        {
-           s = alloc(len + 1);
-           if (s != NULL)
-           {
-               rettv->vval.v_string = s;
-               (void)vim_vsnprintf((char *)s, len + 1, fmt, ap, argvars + 1);
-           }
+           rettv->vval.v_string = s;
+           (void)vim_vsnprintf((char *)s, len + 1, fmt, ap, argvars + 1);
        }
-       did_emsg |= saved_did_emsg;
     }
-#endif
+    did_emsg |= saved_did_emsg;
 }
 
 /*
index 03cb4b1cf57da9f2f39441c453737b384572c920..05f779f9ba4e0cc0a6a31159fbda16250ec32064 100644 (file)
@@ -6023,11 +6023,7 @@ emsg3(char_u *s, char_u *a1, char_u *a2)
 {
     if (emsg_not_now())
        return TRUE;            /* no error messages at the moment */
-#ifdef HAVE_STDARG_H
     vim_snprintf((char *)IObuff, IOSIZE, (char *)s, a1, a2);
-#else
-    vim_snprintf((char *)IObuff, IOSIZE, (char *)s, (long_u)a1, (long_u)a2);
-#endif
     return emsg(IObuff);
 }
 
index bcdba32ad3f01285937c4799399c62bfaf98818e..c179b6f43735d91273855e04b46680678cb084ae 100644 (file)
@@ -20,9 +20,6 @@
 # if defined(AZTEC_C) || defined(__amigaos4__)
 #  define HAVE_STAT_H
 # endif
-# ifdef __amigaos4__
-#  define HAVE_STDARG_H
-# endif
 # define HAVE_STDLIB_H
 # define HAVE_STRING_H
 # define HAVE_FCNTL_H
index 735410fa0b816174da56a22233ca5ae112e12063..245f478d2edc037a1a1f8d13b635ad94a38bc776 100644 (file)
@@ -21,7 +21,6 @@
 # define USE_LONG_FNAME _USE_LFN    /* decide at run time */
 # define USE_FNAME_CASE
 # define HAVE_PUTENV
-# define HAVE_STDARG_H
 #else
 # define SHORT_FNAME           /* always 8.3 file name */
 #endif
index 41728efe296690d11b93e88ca31bc15e2da879be..6da074b1f99e0f9b7a7b14fbb1be9c2ff78f0c04 100644 (file)
 #define HAVE_FSYNC
 #define HAVE_GETPWUID
 #define HAVE_GETPWNAM
-#define HAVE_STDARG_H
 #define        HAVE_STDLIB_H
 #define        HAVE_STRING_H
 #define        HAVE_ERRNO_H
index a6ac891765cb2857118d85244cac5677c7579d34..129117aee54f34ab3b5e715e054fd939737874ac 100644 (file)
@@ -49,9 +49,6 @@
 #ifndef HAVE_FCNTL_H
 # define HAVE_FCNTL_H
 #endif
-#ifndef HAVE_STDARG_H
-# define HAVE_STDARG_H
-#endif
 #define HAVE_QSORT
 #define HAVE_ST_MODE           /* have stat.st_mode */
 
index 63e1249ba3458c3f81208a65b4eb707e37292dc7..1f68b219e819cb3c68001d69cac9e0a212caf193 100644 (file)
@@ -104,9 +104,7 @@ extern int _stricoll(char *a, char *b);
 #  include "menu.pro"
 # endif
 
-# if !defined MESSAGE_FILE || defined(HAVE_STDARG_H)
-    /* These prototypes cannot be produced automatically and conflict with
-     * the old-style prototypes in message.c. */
+/* These prototypes cannot be produced automatically. */
 int
 #  ifdef __BORLANDC__
 _RTLENTRYF
@@ -131,10 +129,7 @@ _RTLENTRYF
 #  endif
 vim_snprintf(char *, size_t, char *, ...);
 
-#  if defined(HAVE_STDARG_H)
 int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs);
-#  endif
-# endif
 
 # include "message.pro"
 # include "misc1.pro"
index 5c21b6a1d787a9b40b12948034b3a25c44e9145f..62075750f1e090afde4e9967a490c77eed3364c0 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1216,
 /**/
     1215,
 /**/
index 1cab32dea13cc570ae744e499dbcc751bec2489c..18610f5c442b8bd3d7a89c4bf35a73a64756444d 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -508,9 +508,7 @@ typedef unsigned long u8char_T;         /* long should be 32 bits or more */
 #ifdef HAVE_WCTYPE_H
 # include <wctype.h>
 #endif
-#ifdef HAVE_STDARG_H
-# include <stdarg.h>
-#endif
+#include <stdarg.h>
 
 #if defined(HAVE_SYS_SELECT_H) && \
        (!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME))