summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulien.pierre.bugs%sun.com <devnull@localhost>2005-04-09 01:46:38 +0000
committerjulien.pierre.bugs%sun.com <devnull@localhost>2005-04-09 01:46:38 +0000
commit2127fe26d2fc2d7fa51bd85f981e173416c3a64e (patch)
tree618b263f7bf53eed1348994832c2d3680898b598
parent670835defec066ef65e3c128f46d291241a700d0 (diff)
downloadnss-hg-2127fe26d2fc2d7fa51bd85f981e173416c3a64e.tar.gz
Fix for 288892 - fix for tstlcnt to help QA run on OS/2 . r=nelson, wtchang
-rw-r--r--security/nss/cmd/tstclnt/tstclnt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/security/nss/cmd/tstclnt/tstclnt.c b/security/nss/cmd/tstclnt/tstclnt.c
index fb658604d..2e0cdbcd9 100644
--- a/security/nss/cmd/tstclnt/tstclnt.c
+++ b/security/nss/cmd/tstclnt/tstclnt.c
@@ -380,7 +380,7 @@ own_GetClientAuthData(void * arg,
return NSS_GetClientAuthData(arg, socket, caNames, pRetCert, pRetKey);
}
-#if defined(WIN32)
+#if defined(WIN32) || defined(OS2)
void
thread_main(void * arg)
{
@@ -389,6 +389,7 @@ thread_main(void * arg)
int wc, rc;
char buf[256];
+#ifdef WIN32
{
/* Put stdin into O_BINARY mode
** or else incoming \r\n's will become \n's.
@@ -401,6 +402,7 @@ thread_main(void * arg)
/* plow ahead anyway */
}
}
+#endif
do {
rc = PR_Read(std_in, buf, sizeof buf);
@@ -771,8 +773,8 @@ int main(int argc, char **argv)
npds = 2;
std_out = PR_GetSpecialFD(PR_StandardOutput);
-#if defined(WIN32)
- /* PR_Poll cannot be used with stdin on Windows. (sigh).
+#if defined(WIN32) || defined(OS2)
+ /* PR_Poll cannot be used with stdin on Windows or OS/2. (sigh).
** But use of PR_Poll and non-blocking sockets is a major feature
** of this program. So, we simulate a pollable stdin with a
** TCP socket pair and a thread that reads stdin and writes to