X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fsysfile.h;h=cc8f2de737fd8bb4465c675d4df64252af4083d6;hb=82da33b61c3e2dd2937db17b75b2838188793053;hp=3f4a6949e67530ac7b98390035ea354120a7cac1;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git- diff --git a/src/sysfile.h b/src/sysfile.h index 3f4a694..cc8f2de 100644 --- a/src/sysfile.h +++ b/src/sysfile.h @@ -244,7 +244,7 @@ Boston, MA 02111-1307, USA. */ Other encapsulations are declared in the appropriate sys*.h file. */ #ifdef ENCAPSULATE_READ -int sys_read (int, void *, size_t); +ssize_t sys_read (int, void *, size_t); #endif #if defined (ENCAPSULATE_READ) && !defined (DONT_ENCAPSULATE) # undef read @@ -255,7 +255,7 @@ int sys_read (int, void *, size_t); #endif #ifdef ENCAPSULATE_WRITE -int sys_write (int, CONST void *, size_t); +ssize_t sys_write (int, CONST void *, size_t); #endif #if defined (ENCAPSULATE_WRITE) && !defined (DONT_ENCAPSULATE) # undef write @@ -380,6 +380,18 @@ int sys_readlink (CONST char *path, char *buf, size_t bufsiz); # define sys_readlink readlink #endif +#ifdef ENCAPSULATE_FSTAT +int sys_fstat (int fd, struct stat *buf); +#endif +#if defined (ENCAPSULATE_FSTAT) && !defined (DONT_ENCAPSULATE) +# undef fstat +/* Need to use arguments to avoid messing with struct stat */ +# define fstat(fd, buf) sys_fstat (fd, buf) +#endif +#if !defined (ENCAPSULATE_FSTAT) && defined (DONT_ENCAPSULATE) +# define sys_fstat fstat +#endif + #ifdef ENCAPSULATE_STAT int sys_stat (CONST char *path, struct stat *buf); #endif