Merge pull request #224 from GitMensch/patch-1

fix compilation with i586-pc-msdosdjgpp (using GCC 4.7.3)
This commit is contained in:
wbhart 2017-10-14 23:36:30 +02:00 committed by GitHub
commit 28c220067a

View File

@ -33,28 +33,6 @@ MA 02110-1301, USA. */
extern const unsigned char __gmp_digit_value_tab[]; extern const unsigned char __gmp_digit_value_tab[];
#define digit_value_tab __gmp_digit_value_tab #define digit_value_tab __gmp_digit_value_tab
size_t
mpz_inp_str (mpz_ptr x, FILE *stream, int base)
{
int c;
size_t nread;
if (stream == 0)
stream = stdin;
nread = 0;
/* Skip whitespace. */
do
{
c = getc (stream);
nread++;
}
while (isspace (c));
return mpz_inp_str_nowhite (x, stream, base, c, nread);
}
/* shared by mpq_inp_str */ /* shared by mpq_inp_str */
size_t size_t
mpz_inp_str_nowhite (mpz_ptr x, FILE *stream, int base, int c, size_t nread) mpz_inp_str_nowhite (mpz_ptr x, FILE *stream, int base, int c, size_t nread)
@ -165,3 +143,25 @@ mpz_inp_str_nowhite (mpz_ptr x, FILE *stream, int base, int c, size_t nread)
(*__gmp_free_func) (str, alloc_size); (*__gmp_free_func) (str, alloc_size);
return nread; return nread;
} }
size_t
mpz_inp_str (mpz_ptr x, FILE *stream, int base)
{
int c;
size_t nread;
if (stream == 0)
stream = stdin;
nread = 0;
/* Skip whitespace. */
do
{
c = getc (stream);
nread++;
}
while (isspace (c));
return mpz_inp_str_nowhite (x, stream, base, c, nread);
}