diff options
Diffstat (limited to 'pr/include')
-rw-r--r-- | pr/include/md/_beos.h | 3 | ||||
-rw-r--r-- | pr/include/md/_macos.h | 4 | ||||
-rw-r--r-- | pr/include/md/_winnt.h | 5 | ||||
-rw-r--r-- | pr/include/private/primpl.h | 4 |
4 files changed, 12 insertions, 4 deletions
diff --git a/pr/include/md/_beos.h b/pr/include/md/_beos.h index 8b56dec3..cd8eee65 100644 --- a/pr/include/md/_beos.h +++ b/pr/include/md/_beos.h @@ -68,6 +68,9 @@ #define _PR_GLOBAL_THREADS_ONLY #define _PR_BTHREADS #define _PR_NEED_FAKE_POLL +#define _PR_HAVE_PEEK_BUFFER +#define _PR_PEEK_BUFFER_MAX (16 * 1024) +#define _PR_FD_NEED_EMULATE_MSG_PEEK(fd) 1 /* Define threading functions and objects as native BeOS */ struct _MDThread { diff --git a/pr/include/md/_macos.h b/pr/include/md/_macos.h index d01fd2c1..8225c510 100644 --- a/pr/include/md/_macos.h +++ b/pr/include/md/_macos.h @@ -46,7 +46,9 @@ #include <setjmp.h> #include <Errors.h> -#define _PR_EMULATE_MSG_PEEK +#define _PR_HAVE_PEEK_BUFFER +#define _PR_PEEK_BUFFER_MAX (16 * 1024) +#define _PR_FD_NEED_EMULATE_MSG_PEEK(fd) 1 struct _MDProcess { PRInt8 notused; diff --git a/pr/include/md/_winnt.h b/pr/include/md/_winnt.h index 4ea950ba..b4bd27f2 100644 --- a/pr/include/md/_winnt.h +++ b/pr/include/md/_winnt.h @@ -50,7 +50,10 @@ #define _PR_HAVE_ATOMIC_OPS #define _PR_HAVE_ATOMIC_CAS #define PR_HAVE_WIN32_NAMED_SHARED_MEMORY -#define _PR_EMULATE_MSG_PEEK +#define _PR_HAVE_PEEK_BUFFER +#define _PR_PEEK_BUFFER_MAX (32 * 1024) +#define _PR_FD_NEED_EMULATE_MSG_PEEK(fd) \ + (!(fd)->secret->nonblocking && !(fd)->secret->inheritable) /* --- Common User-Thread/Native-Thread Definitions --------------------- */ diff --git a/pr/include/private/primpl.h b/pr/include/private/primpl.h index c9d62812..f87adcce 100644 --- a/pr/include/private/primpl.h +++ b/pr/include/private/primpl.h @@ -1577,8 +1577,8 @@ struct PRFilePrivate { PRBool inheritable; PRFileDesc *next; PRIntn lockCount; -#ifdef _PR_EMULATE_MSG_PEEK - char *peekBuf; +#ifdef _PR_HAVE_PEEK_BUFFER + char *peekBuffer; PRInt32 peekBufSize; PRInt32 peekBytes; #endif |