0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 7.4.1216

Problem:    Still using HAVE_STDARG_H.
Solution:   Assume it's always defined.
This commit is contained in:
Bram Moolenaar 2016-01-30 21:48:49 +01:00
parent b638a7be95
commit ba4ef2757c
10 changed files with 22 additions and 44 deletions

2
src/auto/configure vendored
View File

@ -10064,7 +10064,7 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi 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 \ sys/select.h sys/utsname.h termcap.h fcntl.h \
sgtty.h sys/ioctl.h sys/time.h sys/types.h \ sgtty.h sys/ioctl.h sys/time.h sys/types.h \
termio.h iconv.h inttypes.h langinfo.h math.h \ termio.h iconv.h inttypes.h langinfo.h math.h \

View File

@ -15217,23 +15217,17 @@ f_prevnonblank(typval_T *argvars, typval_T *rettv)
rettv->vval.v_number = lnum; rettv->vval.v_number = lnum;
} }
#ifdef HAVE_STDARG_H
/* This dummy va_list is here because: /* This dummy va_list is here because:
* - passing a NULL pointer doesn't work when va_list isn't a pointer * - 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 * - locally in the function results in a "used before set" warning
* - using va_start() to initialize it gives "function with fixed args" error */ * - using va_start() to initialize it gives "function with fixed args" error */
static va_list ap; static va_list ap;
#endif
/* /*
* "printf()" function * "printf()" function
*/ */
static void static void
f_printf(typval_T *argvars, typval_T *rettv) f_printf(typval_T *argvars, typval_T *rettv)
{
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]; char_u buf[NUMBUFLEN];
int len; int len;
@ -15241,6 +15235,9 @@ f_printf(typval_T *argvars, typval_T *rettv)
int saved_did_emsg = did_emsg; int saved_did_emsg = did_emsg;
char *fmt; char *fmt;
rettv->v_type = VAR_STRING;
rettv->vval.v_string = NULL;
/* Get the required length, allocate the buffer and do it for real. */ /* Get the required length, allocate the buffer and do it for real. */
did_emsg = FALSE; did_emsg = FALSE;
fmt = (char *)get_tv_string_buf(&argvars[0], buf); fmt = (char *)get_tv_string_buf(&argvars[0], buf);
@ -15256,8 +15253,6 @@ f_printf(typval_T *argvars, typval_T *rettv)
} }
did_emsg |= saved_did_emsg; did_emsg |= saved_did_emsg;
} }
#endif
}
/* /*
* "pumvisible()" function * "pumvisible()" function

View File

@ -6023,11 +6023,7 @@ emsg3(char_u *s, char_u *a1, char_u *a2)
{ {
if (emsg_not_now()) if (emsg_not_now())
return TRUE; /* no error messages at the moment */ return TRUE; /* no error messages at the moment */
#ifdef HAVE_STDARG_H
vim_snprintf((char *)IObuff, IOSIZE, (char *)s, a1, a2); 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); return emsg(IObuff);
} }

View File

@ -20,9 +20,6 @@
# if defined(AZTEC_C) || defined(__amigaos4__) # if defined(AZTEC_C) || defined(__amigaos4__)
# define HAVE_STAT_H # define HAVE_STAT_H
# endif # endif
# ifdef __amigaos4__
# define HAVE_STDARG_H
# endif
# define HAVE_STDLIB_H # define HAVE_STDLIB_H
# define HAVE_STRING_H # define HAVE_STRING_H
# define HAVE_FCNTL_H # define HAVE_FCNTL_H

View File

@ -21,7 +21,6 @@
# define USE_LONG_FNAME _USE_LFN /* decide at run time */ # define USE_LONG_FNAME _USE_LFN /* decide at run time */
# define USE_FNAME_CASE # define USE_FNAME_CASE
# define HAVE_PUTENV # define HAVE_PUTENV
# define HAVE_STDARG_H
#else #else
# define SHORT_FNAME /* always 8.3 file name */ # define SHORT_FNAME /* always 8.3 file name */
#endif #endif

View File

@ -109,7 +109,6 @@
#define HAVE_FSYNC #define HAVE_FSYNC
#define HAVE_GETPWUID #define HAVE_GETPWUID
#define HAVE_GETPWNAM #define HAVE_GETPWNAM
#define HAVE_STDARG_H
#define HAVE_STDLIB_H #define HAVE_STDLIB_H
#define HAVE_STRING_H #define HAVE_STRING_H
#define HAVE_ERRNO_H #define HAVE_ERRNO_H

View File

@ -49,9 +49,6 @@
#ifndef HAVE_FCNTL_H #ifndef HAVE_FCNTL_H
# define HAVE_FCNTL_H # define HAVE_FCNTL_H
#endif #endif
#ifndef HAVE_STDARG_H
# define HAVE_STDARG_H
#endif
#define HAVE_QSORT #define HAVE_QSORT
#define HAVE_ST_MODE /* have stat.st_mode */ #define HAVE_ST_MODE /* have stat.st_mode */

View File

@ -104,9 +104,7 @@ extern int _stricoll(char *a, char *b);
# include "menu.pro" # include "menu.pro"
# endif # endif
# if !defined MESSAGE_FILE || defined(HAVE_STDARG_H) /* These prototypes cannot be produced automatically. */
/* These prototypes cannot be produced automatically and conflict with
* the old-style prototypes in message.c. */
int int
# ifdef __BORLANDC__ # ifdef __BORLANDC__
_RTLENTRYF _RTLENTRYF
@ -131,10 +129,7 @@ _RTLENTRYF
# endif # endif
vim_snprintf(char *, size_t, char *, ...); 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); int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs);
# endif
# endif
# include "message.pro" # include "message.pro"
# include "misc1.pro" # include "misc1.pro"

View File

@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1216,
/**/ /**/
1215, 1215,
/**/ /**/

View File

@ -508,9 +508,7 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */
#ifdef HAVE_WCTYPE_H #ifdef HAVE_WCTYPE_H
# include <wctype.h> # include <wctype.h>
#endif #endif
#ifdef HAVE_STDARG_H
#include <stdarg.h> #include <stdarg.h>
#endif
#if defined(HAVE_SYS_SELECT_H) && \ #if defined(HAVE_SYS_SELECT_H) && \
(!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME)) (!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME))