Skip to content

Commit bfd3059

Browse files
committed
patch 8.0.0346: Vim relies on limits.h to be included indirectly
Problem: Vim relies on limits.h to be included indirectly, but on Solaris 9 it may not be. (Ben Fritz) Solution: Always include limits.h.
1 parent 3a25773 commit bfd3059

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

src/os_unixx.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,7 @@
6969
#endif
7070

7171
#ifdef HAVE_SYS_SYSTEMINFO_H
72-
/*
73-
* foolish Sinix <sys/systeminfo.h> uses SYS_NMLN but doesn't include
74-
* <limits.h>, where it is defined. Perhaps other systems have the same
75-
* problem? Include it here. -- Slootman
76-
*/
77-
# if defined(HAVE_LIMITS_H) && !defined(_LIMITS_H)
78-
# include <limits.h> /* for SYS_NMLN (Sinix 5.41 / Unix SysV.4) */
79-
# endif
80-
81-
/* Define SYS_NMLN ourselves if it still isn't defined (for CrayT3E). */
72+
/* <sys/systeminfo.h> uses SYS_NMLN but it may not be defined (CrayT3E). */
8273
# ifndef SYS_NMLN
8374
# define SYS_NMLN 32
8475
# endif

src/version.c

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

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
346,
767769
/**/
768770
345,
769771
/**/

src/vim.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,9 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */
487487
# include <errno.h>
488488
#endif
489489

490+
/* for INT_MAX et al. */
491+
#include <limits.h>
492+
490493
/*
491494
* Allow other (non-unix) systems to configure themselves now
492495
* These are also in os_unix.h, because osdef.sh needs them there.

0 commit comments

Comments
 (0)