X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Frmt.h;fp=src%2Frmt.h;h=2155223954c3d6f6e6fe52cae48af77003384eba;hb=9f97e2257e83cb894801cb2ef1a76fbea6842d09;hp=678e042e8d5202b92a350a16857a41a5aff20139;hpb=d148ec43002955faa446d8def70819b6079b96f3;p=chaz%2Ftar diff --git a/src/rmt.h b/src/rmt.h index 678e042..2155223 100644 --- a/src/rmt.h +++ b/src/rmt.h @@ -23,7 +23,7 @@ #ifdef __MSDOS__ #include #else /* !__MSDOS__ */ -extern off_t lseek(); +extern off_t lseek (); #endif /* __MSDOS__ */ #endif /* _POSIX_VERSION */ @@ -55,14 +55,16 @@ extern off_t lseek(); extern char *__rmt_path; -#if defined(USG) || defined(STDC_HEADERS) +#if defined(STDC_HEADERS) || defined(HAVE_STRING_H) #include +#ifndef index #define index strchr +#endif #else -extern char *index(); +extern char *index (); #endif -#define _remdev(path) ((__rmt_path=index(path, ':')) && strncmp(__rmt_path, ":/dev/", 6)==0) +#define _remdev(path) (!f_force_local && (__rmt_path=index(path, ':'))) #define _isrmt(fd) ((fd) >= __REM_BIAS) #define rmtopen(path,oflag,mode) (_remdev(path) ? __rmt_open(path, oflag, mode, __REM_BIAS) : open(path, oflag, mode)) @@ -91,6 +93,6 @@ int __rmt_open (); int __rmt_close (); int __rmt_read (); int __rmt_write (); -long __rmt_lseek(); +long __rmt_lseek (); int __rmt_ioctl (); #endif /* !NO_REMOTE */