Skip to content

Commit 17d15a0

Browse files
committed
Adding check for stdint.h to configure.ac and incuding stdint.h in CoinRational.hpp
1 parent 64bc1d1 commit 17d15a0

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

configure

+7
Original file line numberDiff line numberDiff line change
@@ -19563,6 +19563,13 @@ then :
1956319563

1956419564
fi
1956519565

19566+
ac_fn_cxx_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
19567+
if test "x$ac_cv_header_stdint_h" = xyes
19568+
then :
19569+
printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
19570+
19571+
fi
19572+
1956619573

1956719574
############################################################################
1956819575
# Data type and math function definitions #

configure.ac

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ AC_COIN_DEBUGLEVEL
5252
AC_CHECK_HEADERS([windows.h])
5353
AC_CHECK_HEADERS([endian.h])
5454
AC_CHECK_HEADERS([execinfo.h])
55+
AC_CHECK_HEADERS([stdint.h])
5556

5657
############################################################################
5758
# Data type and math function definitions #

src/CoinRational.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Copyright 2015, Matthew Saltzman and Ted Ralphs
33
// Licensed under the Eclipse Public License
44

5+
#include "CoinUtilsConfig.h"
6+
57
#include <algorithm>
68
#include <cmath>
79
#ifdef __clang__
@@ -10,6 +12,9 @@
1012
#include <cstdio>
1113
#endif
1214
#include <cassert>
15+
#ifdef COINUTILS_HAS_STDINT_H
16+
#include <stdint.h>
17+
#endif
1318

1419
#include "CoinRational.hpp"
1520

0 commit comments

Comments
 (0)