summaryrefslogtreecommitdiff
path: root/pr/tests
diff options
context:
space:
mode:
authorcls%seawood.org <devnull@localhost>2005-06-01 14:10:53 +0000
committercls%seawood.org <devnull@localhost>2005-06-01 14:10:53 +0000
commit0b270d4b837280fd6d036384c5f485ed3ce29d40 (patch)
tree87dd910d037674db4f1ab9af99275933f34a4ed3 /pr/tests
parent67c861af661826f19ed0fc8834340728d46432bd (diff)
downloadnspr-hg-0b270d4b837280fd6d036384c5f485ed3ce29d40.tar.gz
Sync with NSPR 4.6
Bug #295761 a=shaver
Diffstat (limited to 'pr/tests')
-rw-r--r--pr/tests/bigfile3.c1
-rw-r--r--pr/tests/env.c1
-rw-r--r--pr/tests/initclk.c1
-rw-r--r--pr/tests/layer.c1
-rw-r--r--pr/tests/nbconn.c1
-rw-r--r--pr/tests/ntioto.c5
-rw-r--r--pr/tests/op_filnf.c7
-rw-r--r--pr/tests/prpoll.c4
-rw-r--r--pr/tests/randseed.c7
-rw-r--r--pr/tests/sel_spd.c2
-rw-r--r--pr/tests/vercheck.c11
11 files changed, 29 insertions, 12 deletions
diff --git a/pr/tests/bigfile3.c b/pr/tests/bigfile3.c
index 6fa25ca6..3cb806ff 100644
--- a/pr/tests/bigfile3.c
+++ b/pr/tests/bigfile3.c
@@ -39,6 +39,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#ifdef _WIN32
#include <windows.h>
#endif
diff --git a/pr/tests/env.c b/pr/tests/env.c
index 7f82fe08..ff2ba937 100644
--- a/pr/tests/env.c
+++ b/pr/tests/env.c
@@ -45,6 +45,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
PRIntn debug = 0;
PRIntn verbose = 0;
diff --git a/pr/tests/initclk.c b/pr/tests/initclk.c
index ba306d20..6540519e 100644
--- a/pr/tests/initclk.c
+++ b/pr/tests/initclk.c
@@ -49,6 +49,7 @@
#include "prinrval.h"
#include "prlog.h"
#include <stdio.h>
+#include <stdlib.h>
/* The timeouts, in milliseconds */
#define SHORT_TIMEOUT 1000
diff --git a/pr/tests/layer.c b/pr/tests/layer.c
index 7eae46a2..cb914ba0 100644
--- a/pr/tests/layer.c
+++ b/pr/tests/layer.c
@@ -46,6 +46,7 @@
#include "prwin16.h"
#include <stdlib.h>
+#include <string.h>
/*
** Testing layering of I/O
diff --git a/pr/tests/nbconn.c b/pr/tests/nbconn.c
index d2fe6093..099150a5 100644
--- a/pr/tests/nbconn.c
+++ b/pr/tests/nbconn.c
@@ -59,6 +59,7 @@
#include "nspr.h"
#include "plgetopt.h"
#include <stdio.h>
+#include <string.h>
#ifdef XP_MAC
#define printf PR_LogPrint
diff --git a/pr/tests/ntioto.c b/pr/tests/ntioto.c
index 44e2a608..0dc0072a 100644
--- a/pr/tests/ntioto.c
+++ b/pr/tests/ntioto.c
@@ -136,10 +136,11 @@ static void AcceptThread(void *arg)
ACCEPT_READ_DATASIZE,
PR_SecondsToInterval(1));
- if ( bytesRead == -1 && PR_GetError() == PR_IO_TIMEOUT_ERROR )
+ if ( bytesRead == -1 && PR_GetError() == PR_IO_TIMEOUT_ERROR ) {
if ( debug ) printf("AcceptRead timed out\n");
- else
+ } else {
if ( debug ) printf("Oops! read: %d, error: %d\n", bytesRead, PR_GetError());
+ }
while( state != AllDone ) {
PR_Lock( ml );
diff --git a/pr/tests/op_filnf.c b/pr/tests/op_filnf.c
index aeb2014d..5f676250 100644
--- a/pr/tests/op_filnf.c
+++ b/pr/tests/op_filnf.c
@@ -77,7 +77,7 @@ int main(int argc, char **argv)
PR_STDIO_INIT();
t1 = PR_Open("/usr/tmp/ttools/err03.tmp", PR_TRUNCATE | PR_RDWR, 0666);
- if (t1 == NULL)
+ if (t1 == NULL) {
if (PR_GetError() == PR_FILE_NOT_FOUND_ERROR) {
printf ("error code is %d \n", PR_GetError());
printf ("PASS\n");
@@ -88,4 +88,9 @@ int main(int argc, char **argv)
printf ("FAIL\n");
return 1;
}
+ }
+ PR_Close(t1);
+ printf ("opened a file that should not exist\n");
+ printf ("FAIL\n");
+ return 1;
}
diff --git a/pr/tests/prpoll.c b/pr/tests/prpoll.c
index 5e4893f9..9058981b 100644
--- a/pr/tests/prpoll.c
+++ b/pr/tests/prpoll.c
@@ -43,6 +43,10 @@
#include <io.h> /* for close() */
#endif
+#ifdef XP_UNIX
+#include <unistd.h> /* for close() */
+#endif
+
#include "prinit.h"
#include "prio.h"
#include "prlog.h"
diff --git a/pr/tests/randseed.c b/pr/tests/randseed.c
index df80bb8f..fc1fbaeb 100644
--- a/pr/tests/randseed.c
+++ b/pr/tests/randseed.c
@@ -46,11 +46,12 @@
** ... more? ... histogram distribution of random numbers
*/
-#include <plgetopt.h>
-#include <nspr.h>
-#include <prrng.h>
+#include "plgetopt.h"
+#include "nspr.h"
+#include "prrng.h"
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
/*
** Test harness infrastructure
diff --git a/pr/tests/sel_spd.c b/pr/tests/sel_spd.c
index 6760e640..c3b79652 100644
--- a/pr/tests/sel_spd.c
+++ b/pr/tests/sel_spd.c
@@ -455,7 +455,7 @@ int main(int argc, char **argv)
{
#if defined(XP_UNIX) || defined(XP_OS2_EMX)
int opt;
- extern char *optarg;
+ PR_IMPORT_DATA(char *) optarg;
#endif
#if defined(XP_UNIX) || defined(XP_OS2_EMX)
diff --git a/pr/tests/vercheck.c b/pr/tests/vercheck.c
index eed5006a..d1fdb96e 100644
--- a/pr/tests/vercheck.c
+++ b/pr/tests/vercheck.c
@@ -52,13 +52,14 @@
#include <stdlib.h>
/*
- * This release (4.5) is backward compatible with the
- * 4.0.x, 4.1.x, 4.2.x, 4.3.x, and 4.4.x releases. It, of course,
+ * This release (4.6) is backward compatible with the
+ * 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.x, and 4.5.x releases. It, of course,
* is compatible with itself.
*/
static char *compatible_version[] = {
"4.0", "4.0.1", "4.1", "4.1.1", "4.1.2", "4.1.3",
- "4.2", "4.2.1", "4.2.2", "4.3", "4.4", "4.4.1", PR_VERSION
+ "4.2", "4.2.1", "4.2.2", "4.3", "4.4", "4.4.1",
+ "4.5", "4.5.1", PR_VERSION
};
/*
@@ -73,8 +74,8 @@ static char *incompatible_version[] = {
"3.0", "3.0.1",
"3.1", "3.1.1", "3.1.2", "3.1.3",
"3.5", "3.5.1",
- "4.5.3",
- "4.6", "4.6.1",
+ "4.6.3",
+ "4.7", "4.7.1",
"10.0", "11.1", "12.14.20"
};