diff options
author | Steve Bennett <steveb@workware.net.au> | 2023-05-28 11:22:12 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2023-07-04 09:23:43 +1000 |
commit | 41f431f30cc6118ef982c6374914810cd07a8106 (patch) | |
tree | 036384d2c7e90a0236642ebf65686601c92656d5 /jimiocompat.h | |
parent | ad720049ec1ae3536d64fbb4c80a79e65ba5af39 (diff) | |
download | jimtcl-41f431f30cc6118ef982c6374914810cd07a8106.zip jimtcl-41f431f30cc6118ef982c6374914810cd07a8106.tar.gz jimtcl-41f431f30cc6118ef982c6374914810cd07a8106.tar.bz2 |
aio: change to use unix io, not stdio
This changes especially makes buffered I/O work
with non-blocking channels.
- separate read and write buffering
- support for timeout on blocking read
- read/write on same channel in event loop with buffering
- read buffer is the same across read, gets, copyto
- autoflush non-blocking writes via event loop
- copyto can now copy to any filehandle-like command
- add some copyto tests
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jimiocompat.h')
-rw-r--r-- | jimiocompat.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/jimiocompat.h b/jimiocompat.h index 64aa4ff..0837b73 100644 --- a/jimiocompat.h +++ b/jimiocompat.h @@ -68,6 +68,7 @@ int Jim_OpenForRead(const char *filename); typedef struct __stat64 jim_stat_t; #define Jim_Stat _stat64 #define Jim_FileStat _fstat64 + #define Jim_Lseek _lseeki64 #else #if defined(HAVE_STAT64) @@ -89,6 +90,11 @@ int Jim_OpenForRead(const char *filename); #define Jim_LinkStat lstat #endif #endif + #if defined(HAVE_LSEEK64) + #define Jim_Lseek lseek64 + #else + #define Jim_Lseek lseek + #endif #if defined(HAVE_UNISTD_H) #include <unistd.h> @@ -107,6 +113,10 @@ int Jim_OpenForRead(const char *filename); #endif #endif +#ifndef O_TEXT +#define O_TEXT 0 +#endif + /* jim-file.c */ /* Note that this is currently an internal function only. * It does not form part of the public Jim API |