diff options
| author | Paul Eggert | 2013-10-07 01:05:00 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-10-07 01:05:00 -0700 |
| commit | 223752d78f464f6cabafa76f32089300522d3ff4 (patch) | |
| tree | 757d9055bfb2a434d787a6280d8e4d5461302097 /src/sysdep.c | |
| parent | 3c439e0a8410d713488b16af5842ad8ef0cddb04 (diff) | |
| download | emacs-223752d78f464f6cabafa76f32089300522d3ff4.tar.gz emacs-223752d78f464f6cabafa76f32089300522d3ff4.zip | |
emacs_read and emacs_write now use void *, not char *.
* alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
* sysdep.c (emacs_read, emacs_write, emacs_write_sig):
Buffer arg is now void *, not char *. This matches plain
'read' and 'write' better, and avoids a constraint violation
on Solaris 9 with Oracle Studio.
Diffstat (limited to 'src/sysdep.c')
| -rw-r--r-- | src/sysdep.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 84859813249..f78a8fbb2ef 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -2257,9 +2257,9 @@ emacs_close (int fd) | |||
| 2257 | Return the number of bytes read, which might be less than NBYTE. | 2257 | Return the number of bytes read, which might be less than NBYTE. |
| 2258 | On error, set errno and return -1. */ | 2258 | On error, set errno and return -1. */ |
| 2259 | ptrdiff_t | 2259 | ptrdiff_t |
| 2260 | emacs_read (int fildes, char *buf, ptrdiff_t nbyte) | 2260 | emacs_read (int fildes, void *buf, ptrdiff_t nbyte) |
| 2261 | { | 2261 | { |
| 2262 | register ssize_t rtnval; | 2262 | ssize_t rtnval; |
| 2263 | 2263 | ||
| 2264 | /* There is no need to check against MAX_RW_COUNT, since no caller ever | 2264 | /* There is no need to check against MAX_RW_COUNT, since no caller ever |
| 2265 | passes a size that large to emacs_read. */ | 2265 | passes a size that large to emacs_read. */ |
| @@ -2310,14 +2310,14 @@ emacs_full_write (int fildes, char const *buf, ptrdiff_t nbyte, | |||
| 2310 | interrupted or if a partial write occurs. Return the number of | 2310 | interrupted or if a partial write occurs. Return the number of |
| 2311 | bytes written, setting errno if this is less than NBYTE. */ | 2311 | bytes written, setting errno if this is less than NBYTE. */ |
| 2312 | ptrdiff_t | 2312 | ptrdiff_t |
| 2313 | emacs_write (int fildes, char const *buf, ptrdiff_t nbyte) | 2313 | emacs_write (int fildes, void const *buf, ptrdiff_t nbyte) |
| 2314 | { | 2314 | { |
| 2315 | return emacs_full_write (fildes, buf, nbyte, 0); | 2315 | return emacs_full_write (fildes, buf, nbyte, 0); |
| 2316 | } | 2316 | } |
| 2317 | 2317 | ||
| 2318 | /* Like emacs_write, but also process pending signals if interrupted. */ | 2318 | /* Like emacs_write, but also process pending signals if interrupted. */ |
| 2319 | ptrdiff_t | 2319 | ptrdiff_t |
| 2320 | emacs_write_sig (int fildes, char const *buf, ptrdiff_t nbyte) | 2320 | emacs_write_sig (int fildes, void const *buf, ptrdiff_t nbyte) |
| 2321 | { | 2321 | { |
| 2322 | return emacs_full_write (fildes, buf, nbyte, 1); | 2322 | return emacs_full_write (fildes, buf, nbyte, 1); |
| 2323 | } | 2323 | } |