diff options
author | wtc%netscape.com <devnull@localhost> | 2002-03-14 23:21:20 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2002-03-14 23:21:20 +0000 |
commit | ce4c2ac7676a8af91a6e3faef89a2d88d8148c59 (patch) | |
tree | da7676750650a85012799363c033f89f1daabbf7 /pr/tests | |
parent | be0aa4947eb823e4e22a653ac402a9993c7eac70 (diff) | |
download | nspr-hg-ce4c2ac7676a8af91a6e3faef89a2d88d8148c59.tar.gz |
Bugzilla bug 129902: sync up the NSPR_PRE_4_2_CLIENT_BRANCH with the NSPR
tip. a=dbaron on behalf of drivers@mozilla.org.
Diffstat (limited to 'pr/tests')
-rw-r--r-- | pr/tests/Makefile.in | 6 | ||||
-rw-r--r-- | pr/tests/sigpipe.c | 26 | ||||
-rw-r--r-- | pr/tests/vercheck.c | 12 |
3 files changed, 32 insertions, 12 deletions
diff --git a/pr/tests/Makefile.in b/pr/tests/Makefile.in index 7e8dbaf7..f9dcff34 100644 --- a/pr/tests/Makefile.in +++ b/pr/tests/Makefile.in @@ -296,8 +296,10 @@ endif ifeq ($(OS_ARCH), HP-UX) LDOPTS += -z -Wl,+s,+b,$(ABSOLUTE_LIB_DIR) ifeq ($(USE_64),1) - LDOPTS += +DA2.0W - EXTRA_LIBS = -lpthread + LDOPTS += +DD64 + endif + ifeq ($(USE_PTHREADS),1) + EXTRA_LIBS = $(LIBPTHREAD) endif endif diff --git a/pr/tests/sigpipe.c b/pr/tests/sigpipe.c index 2c708e29..28e7e251 100644 --- a/pr/tests/sigpipe.c +++ b/pr/tests/sigpipe.c @@ -69,7 +69,7 @@ int main(void) #endif #include <errno.h> -int main(void) +static void Test(void *arg) { #ifdef XP_OS2 HFILE pipefd[2]; @@ -79,9 +79,6 @@ int main(void) int rv; char c = '\0'; - /* This initializes NSPR. */ - PR_SetError(0, 0); - #ifdef XP_OS2 if (DosCreatePipe(&pipefd[0], &pipefd[1], 4096) != 0) { #else @@ -103,6 +100,27 @@ int main(void) } close(pipefd[1]); printf("write to broken pipe failed with EPIPE, as expected\n"); +} + +int main(void) +{ + PRThread *thread; + + /* This initializes NSPR. */ + PR_SetError(0, 0); + + thread = PR_CreateThread(PR_USER_THREAD, Test, NULL, PR_PRIORITY_NORMAL, + PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0); + if (thread == NULL) { + fprintf(stderr, "PR_CreateThread failed\n"); + exit(1); + } + if (PR_JoinThread(thread) == PR_FAILURE) { + fprintf(stderr, "PR_JoinThread failed\n"); + exit(1); + } + Test(NULL); + printf("PASSED\n"); return 0; } diff --git a/pr/tests/vercheck.c b/pr/tests/vercheck.c index 49f6ea22..4235a832 100644 --- a/pr/tests/vercheck.c +++ b/pr/tests/vercheck.c @@ -49,12 +49,12 @@ #include <stdlib.h> /* - * This release (4.1) is backward compatible with the - * 4.0.x releases. It, of course, is compatible with - * itself. + * This release (4.2) is backward compatible with the + * 4.0.x and 4.1.x releases. It, of course, is compatible + * with itself. */ static char *compatible_version[] = { - "4.0", "4.0.1", "4.0.2", PR_VERSION + "4.0", "4.0.1", "4.1", "4.1.1", "4.1.2", "4.1.3", PR_VERSION }; /* @@ -69,8 +69,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.1.3", - "4.2", "4.2.1", + "4.2.3", + "4.3", "4.3.1", "10.0", "11.1", "12.14.20" }; |