diff options
author | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2008-11-28 09:45:04 +0000 |
---|---|---|
committer | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2008-11-28 09:45:04 +0000 |
commit | bebde27c3f185eea83edb2ef87723eb4cfb16aa6 (patch) | |
tree | b6a8eec6cf273b130b7887e69c96aa38f7f8a267 | |
parent | 154491701d380a836a5b743f6810c0d1808592e8 (diff) | |
download | mpc-bebde27c3f185eea83edb2ef87723eb4cfb16aa6.tar.gz |
revert to revision 359
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@361 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/ui_div.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 203b241..e757f30 100644 --- a/configure.ac +++ b/configure.ac @@ -135,7 +135,7 @@ error # Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS([unistd.h sys/time.h]) +AC_CHECK_HEADERS([limits.h unistd.h sys/time.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST diff --git a/src/ui_div.c b/src/ui_div.c index b3e9311..474deb0 100644 --- a/src/ui_div.c +++ b/src/ui_div.c @@ -19,6 +19,7 @@ along with the MPC Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <limits.h> #include "gmp.h" #include "mpfr.h" #include "mpc.h" @@ -37,7 +38,7 @@ mpc_ui_div (mpc_ptr a, unsigned long int b, mpc_srcptr c, mpc_rnd_t rnd) return MPC_INEX(inex, 0); } - mpc_init2 (bb, 8 * sizeof(unsigned long int)); + mpc_init2 (bb, sizeof(unsigned long int) * CHAR_BIT); mpc_set_ui (bb, b, rnd); /* exact */ |