Skip to content

Commit c593bec

Browse files
committed
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)
1 parent e010c72 commit c593bec

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

src/json.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,15 @@ json_encode_item(garray_T *gap, typval_T *val, int copyID, int options)
194194
switch (val->v_type)
195195
{
196196
case VAR_BOOL:
197-
switch (val->vval.v_number)
197+
switch ((long)val->vval.v_number)
198198
{
199199
case VVAL_FALSE: ga_concat(gap, (char_u *)"false"); break;
200200
case VVAL_TRUE: ga_concat(gap, (char_u *)"true"); break;
201201
}
202202
break;
203203

204204
case VAR_SPECIAL:
205-
switch (val->vval.v_number)
205+
switch ((long)val->vval.v_number)
206206
{
207207
case VVAL_NONE: if ((options & JSON_JS) != 0
208208
&& (options & JSON_NO_NONE) == 0)

src/structs.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,9 +1279,15 @@ typedef long_u hash_T; // Type for hi_hash
12791279
#else
12801280
typedef long long varnumber_T;
12811281
typedef unsigned long long uvarnumber_T;
1282-
# define VARNUM_MIN LLONG_MIN
1283-
# define VARNUM_MAX LLONG_MAX
1284-
# define UVARNUM_MAX ULLONG_MAX
1282+
# ifdef LLONG_MIN
1283+
# define VARNUM_MIN LLONG_MIN
1284+
# define VARNUM_MAX LLONG_MAX
1285+
# define UVARNUM_MAX ULLONG_MAX
1286+
# else
1287+
# define VARNUM_MIN LONG_LONG_MIN
1288+
# define VARNUM_MAX LONG_LONG_MAX
1289+
# define UVARNUM_MAX ULONG_LONG_MAX
1290+
# endif
12851291
#endif
12861292

12871293
typedef double float_T;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
315,
741743
/**/
742744
314,
743745
/**/

0 commit comments

Comments
 (0)