Branch: Tag:

2014-12-06

2014-12-06 20:56:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Stdio.Buffer: Use ptrdiff_t instead of ssize_t.

ptrdiff_t is C89, while ssize_t is POSIX. As we support some
non-POSIX architectures, use the more portable type.

369:    }    }    -  static struct pike_string *io_read_string( Buffer *io, ssize_t len ) +  static struct pike_string *io_read_string( Buffer *io, ptrdiff_t len )    ATTRIBUTE((noclone,noinline));    static size_t io_rewind( Buffer *io, INT_TYPE n );   
571:    return len;    }    -  static struct pike_string *io_read_string( Buffer *io, ssize_t len ) +  static struct pike_string *io_read_string( Buffer *io, ptrdiff_t len )    {    struct pike_string *s;   
684:    unsigned char*d;    struct pike_string *s;    int pad = 0; -  ssize_t bytes; +  ptrdiff_t bytes;    size_t exp;       if( mpz_sgn( i ) < 0 )