diff options
| author | Eli Zaretskii | 2011-04-10 23:43:08 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2011-04-10 23:43:08 +0300 |
| commit | 8a2cbd723c0b453b70dc1fcefe5b489f58605258 (patch) | |
| tree | a1268c68ffe5a72329d60fcf6280485f8ba2327e /src/sysdep.c | |
| parent | 1ebfdcb6eff7ebe4cf5ef3426944513a2ecdfacf (diff) | |
| download | emacs-8a2cbd723c0b453b70dc1fcefe5b489f58605258.tar.gz emacs-8a2cbd723c0b453b70dc1fcefe5b489f58605258.zip | |
Fix write-region and its subroutines for buffers > 2GB.
src/fileio.c (a_write, e_write): Modify declaration of arguments and
local variables to support buffers larger than 2GB.
(Fcopy_file): Use EMACS_INT for return value of emacs_read.
src/sysdep.c (emacs_write, emacs_read): Use ssize_t for last
argument, local variables, and return value.
src/lisp.h: Update prototypes of emacs_write and emacs_read.
src/sound.c (vox_write): Use ssize_t for return value of emacs_write.
Diffstat (limited to 'src/sysdep.c')
| -rw-r--r-- | src/sysdep.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index f4f767dac3f..37c9f73dba9 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -1825,10 +1825,10 @@ emacs_close (int fd) | |||
| 1825 | return rtnval; | 1825 | return rtnval; |
| 1826 | } | 1826 | } |
| 1827 | 1827 | ||
| 1828 | int | 1828 | ssize_t |
| 1829 | emacs_read (int fildes, char *buf, unsigned int nbyte) | 1829 | emacs_read (int fildes, char *buf, ssize_t nbyte) |
| 1830 | { | 1830 | { |
| 1831 | register int rtnval; | 1831 | register ssize_t rtnval; |
| 1832 | 1832 | ||
| 1833 | while ((rtnval = read (fildes, buf, nbyte)) == -1 | 1833 | while ((rtnval = read (fildes, buf, nbyte)) == -1 |
| 1834 | && (errno == EINTR)) | 1834 | && (errno == EINTR)) |
| @@ -1836,10 +1836,10 @@ emacs_read (int fildes, char *buf, unsigned int nbyte) | |||
| 1836 | return (rtnval); | 1836 | return (rtnval); |
| 1837 | } | 1837 | } |
| 1838 | 1838 | ||
| 1839 | int | 1839 | ssize_t |
| 1840 | emacs_write (int fildes, const char *buf, unsigned int nbyte) | 1840 | emacs_write (int fildes, const char *buf, ssize_t nbyte) |
| 1841 | { | 1841 | { |
| 1842 | register int rtnval, bytes_written; | 1842 | register ssize_t rtnval, bytes_written; |
| 1843 | 1843 | ||
| 1844 | bytes_written = 0; | 1844 | bytes_written = 0; |
| 1845 | 1845 | ||