aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorPaul Eggert2013-10-07 01:05:00 -0700
committerPaul Eggert2013-10-07 01:05:00 -0700
commit223752d78f464f6cabafa76f32089300522d3ff4 (patch)
tree757d9055bfb2a434d787a6280d8e4d5461302097 /src/sysdep.c
parent3c439e0a8410d713488b16af5842ad8ef0cddb04 (diff)
downloademacs-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.c8
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. */
2259ptrdiff_t 2259ptrdiff_t
2260emacs_read (int fildes, char *buf, ptrdiff_t nbyte) 2260emacs_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. */
2312ptrdiff_t 2312ptrdiff_t
2313emacs_write (int fildes, char const *buf, ptrdiff_t nbyte) 2313emacs_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. */
2319ptrdiff_t 2319ptrdiff_t
2320emacs_write_sig (int fildes, char const *buf, ptrdiff_t nbyte) 2320emacs_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}