Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d90a426

Browse files
committed
Linux defines MAXINT in values.h, which causes an error when compiling.
Wrap it in an #ifndef to prevent this
1 parent 632c44d commit d90a426

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/optimizer/path/costsize.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.11 1997/01/24 18:00:10 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.12 1997/01/26 16:06:42 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -23,7 +23,9 @@
2323
#else
2424
# ifdef HAVE_LIMITS_H
2525
# include <limits.h>
26-
# define MAXINT INT_MAX
26+
# ifndef MAXINT
27+
# define MAXINT INT_MAX
28+
# endif
2729
# else
2830
# ifdef HAVE_VALUES_H
2931
# include <values.h>

0 commit comments

Comments
 (0)