0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0315: build failure on HP-UX system

Problem:    Build failure on HP-UX system.
Solution:   Use LONG_LONG_MIN instead of LLONG_MIN.  Add type casts for switch
            statement. (John Marriott)
This commit is contained in:
Bram Moolenaar
2020-02-25 21:26:49 +01:00
parent e010c720b2
commit c593bec412
3 changed files with 13 additions and 5 deletions

View File

@@ -194,7 +194,7 @@ json_encode_item(garray_T *gap, typval_T *val, int copyID, int options)
switch (val->v_type) switch (val->v_type)
{ {
case VAR_BOOL: case VAR_BOOL:
switch (val->vval.v_number) switch ((long)val->vval.v_number)
{ {
case VVAL_FALSE: ga_concat(gap, (char_u *)"false"); break; case VVAL_FALSE: ga_concat(gap, (char_u *)"false"); break;
case VVAL_TRUE: ga_concat(gap, (char_u *)"true"); break; case VVAL_TRUE: ga_concat(gap, (char_u *)"true"); break;
@@ -202,7 +202,7 @@ json_encode_item(garray_T *gap, typval_T *val, int copyID, int options)
break; break;
case VAR_SPECIAL: case VAR_SPECIAL:
switch (val->vval.v_number) switch ((long)val->vval.v_number)
{ {
case VVAL_NONE: if ((options & JSON_JS) != 0 case VVAL_NONE: if ((options & JSON_JS) != 0
&& (options & JSON_NO_NONE) == 0) && (options & JSON_NO_NONE) == 0)

View File

@@ -1279,9 +1279,15 @@ typedef long_u hash_T; // Type for hi_hash
#else #else
typedef long long varnumber_T; typedef long long varnumber_T;
typedef unsigned long long uvarnumber_T; typedef unsigned long long uvarnumber_T;
# define VARNUM_MIN LLONG_MIN # ifdef LLONG_MIN
# define VARNUM_MAX LLONG_MAX # define VARNUM_MIN LLONG_MIN
# define UVARNUM_MAX ULLONG_MAX # define VARNUM_MAX LLONG_MAX
# define UVARNUM_MAX ULLONG_MAX
# else
# define VARNUM_MIN LONG_LONG_MIN
# define VARNUM_MAX LONG_LONG_MAX
# define UVARNUM_MAX ULONG_LONG_MAX
# endif
#endif #endif
typedef double float_T; typedef double float_T;

View File

@@ -738,6 +738,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 */
/**/
315,
/**/ /**/
314, 314,
/**/ /**/