#define SFMTXOUT (0)
#define SFMTXERR (0)
-Sfio_t _Sfstdin = SFNEW(NULL, -1, 0, (SF_READ | SF_STATIC | SF_MTSAFE), NULL,
- SFMTXIN);
-Sfio_t _Sfstdout = SFNEW(NULL, -1, 1, (SF_WRITE | SF_STATIC | SF_MTSAFE), NULL,
- SFMTXOUT);
-Sfio_t _Sfstderr = SFNEW(NULL, -1, 2, (SF_WRITE | SF_STATIC | SF_MTSAFE), NULL,
- SFMTXERR);
+Sfio_t _Sfstdin = SFNEW(NULL, -1, 0, (SF_READ | SF_STATIC), NULL, SFMTXIN);
+Sfio_t _Sfstdout = SFNEW(NULL, -1, 1, (SF_WRITE | SF_STATIC), NULL, SFMTXOUT);
+Sfio_t _Sfstderr = SFNEW(NULL, -1, 2, (SF_WRITE | SF_STATIC), NULL, SFMTXERR);
Sfio_t *sfstdin = &_Sfstdin;
Sfio_t *sfstdout = &_Sfstdout;
#include <errno.h>
#include <ctype.h>
-#undef SF_MTSAFE /* no need to worry about thread-safety */
-#define SF_MTSAFE 0
-
#define SFMTXSTART(f,v) { if(!f) return(v); }
#define SFMTXRETURN(f,v) { return(v); }
/* lock/open a stream */
#define SFMODE(f,l) ((f)->mode & ~(SF_RV|SF_RC|((l) ? SF_LOCK : 0)) )
#define SFLOCK(f,l) (void)((f)->mode |= SF_LOCK, (f)->endr = (f)->endw = (f)->data)
-#define _SFOPENRD(f) ((f)->endr = ((f)->flags&SF_MTSAFE) ? (f)->data : (f)->endb)
-#define _SFOPENWR(f) ((f)->endw = ((f)->flags&(SF_MTSAFE|SF_LINE)) ? (f)->data : (f)->endb)
+#define _SFOPENRD(f) ((f)->endr = (f)->endb)
+#define _SFOPENWR(f) ((f)->endw = ((f)->flags&SF_LINE) ? (f)->data : (f)->endb)
#define _SFOPEN(f) ((f)->mode == SF_READ ? _SFOPENRD(f) : \
(f)->mode == SF_WRITE ? _SFOPENWR(f) : \
((f)->endw = (f)->endr = (f)->data) )
#define SF_STATIC 0001000 /* a stream that cannot be freed */
#define SF_IOCHECK 0002000 /* call exceptf before doing IO */
#define SF_PUBLIC 0004000 /* SF_SHARE and follow physical seek */
-#define SF_MTSAFE 0010000 /* need thread safety */
#define SF_WHOLE 0020000 /* preserve wholeness of sfwrite/sfputr */
#define SF_FLAGS 0077177 /* PUBLIC FLAGS PASSABLE TO SFNEW() */
sflags |= SF_READ | SF_WRITE;
continue;
case 'm':
- sflags |= SF_MTSAFE;
uflag = 0;
continue;
case 'u':
- sflags &= (unsigned short)~SF_MTSAFE;
uflag = 1;
continue;
default: