summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/auto/configure2
-rw-r--r--src/eval.c39
-rw-r--r--src/misc2.c4
-rw-r--r--src/os_amiga.h3
-rw-r--r--src/os_msdos.h1
-rw-r--r--src/os_vms_conf.h1
-rw-r--r--src/os_win32.h3
-rw-r--r--src/proto.h7
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h4
10 files changed, 22 insertions, 44 deletions
diff --git a/src/auto/configure b/src/auto/configure
index 8dfecaf28..967a56882 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -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 \
diff --git a/src/eval.c b/src/eval.c
index fc512aba9..90fa53a11 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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;
}
/*
diff --git a/src/misc2.c b/src/misc2.c
index 03cb4b1cf..05f779f9b 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -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);
}
diff --git a/src/os_amiga.h b/src/os_amiga.h
index bcdba32ad..c179b6f43 100644
--- a/src/os_amiga.h
+++ b/src/os_amiga.h
@@ -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
diff --git a/src/os_msdos.h b/src/os_msdos.h
index 735410fa0..245f478d2 100644
--- a/src/os_msdos.h
+++ b/src/os_msdos.h
@@ -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
diff --git a/src/os_vms_conf.h b/src/os_vms_conf.h
index 41728efe2..6da074b1f 100644
--- a/src/os_vms_conf.h
+++ b/src/os_vms_conf.h
@@ -109,7 +109,6 @@
#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
diff --git a/src/os_win32.h b/src/os_win32.h
index a6ac89176..129117aee 100644
--- a/src/os_win32.h
+++ b/src/os_win32.h
@@ -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 */
diff --git a/src/proto.h b/src/proto.h
index 63e1249ba..1f68b219e 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -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"
diff --git a/src/version.c b/src/version.c
index 5c21b6a1d..62075750f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1216,
+/**/
1215,
/**/
1214,
diff --git a/src/vim.h b/src/vim.h
index 1cab32dea..18610f5c4 100644
--- 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))