diff options
author | wtc%netscape.com <devnull@localhost> | 1999-03-09 05:12:06 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 1999-03-09 05:12:06 +0000 |
commit | 9169c1293506939fbb1661bfd3177830a7c69a8e (patch) | |
tree | bc6365328352a62e672ce606b68e739f28803ab4 | |
parent | 160ae8b3f34203377eb60a5c7efb362c5d5f8861 (diff) | |
download | nspr-hg-NSPRPUB_RELEASE_3_1_ALMOST.tar.gz |
Another update from the internal CVS repository /m/src.NSPRPUB_RELEASE_3_1_ALMOST
-rw-r--r-- | pr/include/md/_bsdi.cfg | 2 | ||||
-rw-r--r-- | pr/include/md/_unixos.h | 2 | ||||
-rw-r--r-- | pr/include/prerror.h | 8 | ||||
-rw-r--r-- | pr/include/prinit.h | 2 | ||||
-rw-r--r-- | pr/src/Makefile | 2 | ||||
-rw-r--r-- | pr/src/misc/pratom.c | 5 | ||||
-rw-r--r-- | pr/src/pthreads/ptthread.c | 1 | ||||
-rw-r--r-- | pr/tests/Makefile | 8 | ||||
-rw-r--r-- | pr/tests/socket.c | 2 | ||||
-rw-r--r-- | pr/tests/testfile.c | 27 |
10 files changed, 34 insertions, 25 deletions
diff --git a/pr/include/md/_bsdi.cfg b/pr/include/md/_bsdi.cfg index 335baf4e..8edf411c 100644 --- a/pr/include/md/_bsdi.cfg +++ b/pr/include/md/_bsdi.cfg @@ -29,7 +29,7 @@ #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN -#undef HAVE_LONG_LONG +#define HAVE_LONG_LONG #undef HAVE_ALIGNED_DOUBLES #undef HAVE_ALIGNED_LONGLONGS diff --git a/pr/include/md/_unixos.h b/pr/include/md/_unixos.h index 85918612..cd564f41 100644 --- a/pr/include/md/_unixos.h +++ b/pr/include/md/_unixos.h @@ -530,7 +530,7 @@ extern int poll(struct pollfd *, unsigned long, int); */ typedef PRInt64 off64_t; typedef PRUint64 ino64_t; -typedef PRUint64 blkcnt64_t; +typedef PRInt64 blkcnt64_t; struct stat64 { dev_t st_dev; long st_pad1[3]; diff --git a/pr/include/prerror.h b/pr/include/prerror.h index 54bd5cb9..492a97e8 100644 --- a/pr/include/prerror.h +++ b/pr/include/prerror.h @@ -90,6 +90,14 @@ make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ + +/* + * NOTE: + * The interfaces for error-code-translation described in the rest of + * this file are preliminary in the 3.1 release of nspr and are subject + * to change in future releases. + */ + /* ** Description: Localizable error code to string function. ** diff --git a/pr/include/prinit.h b/pr/include/prinit.h index 1df1dcf8..21b6eb67 100644 --- a/pr/include/prinit.h +++ b/pr/include/prinit.h @@ -48,7 +48,7 @@ PR_BEGIN_EXTERN_C #define PR_VMAJOR 3 #define PR_VMINOR 1 #define PR_VPATCH 0 -#define PR_BETA PR_TRUE +#define PR_BETA PR_FALSE /* ** PRVersionCheck diff --git a/pr/src/Makefile b/pr/src/Makefile index 0e7c4e74..336de2fa 100644 --- a/pr/src/Makefile +++ b/pr/src/Makefile @@ -47,7 +47,7 @@ export OPTIMIZER OS_LIBS = -lm else # 4.1.3_U1 ifdef USE_PTHREADS -OS_LIBS = -lpthread -lposix4 -lsocket -lnsl -ldl +OS_LIBS = -lpthread -lthread -lposix4 -lsocket -lnsl -ldl else ifdef LOCAL_THREADS_ONLY OS_LIBS = -lsocket -lnsl -ldl diff --git a/pr/src/misc/pratom.c b/pr/src/misc/pratom.c index b1ee8277..f88fb23f 100644 --- a/pr/src/misc/pratom.c +++ b/pr/src/misc/pratom.c @@ -102,10 +102,7 @@ PRIntn lock_count; num_atomic_locks = MAX_ATOMIC_LOCKS; else { num_atomic_locks = PR_FloorLog2(num_atomic_locks); - if (num_atomic_locks == 0) - num_atomic_locks = DEFAULT_ATOMIC_LOCKS; - else - num_atomic_locks = 1L << num_atomic_locks; + num_atomic_locks = 1L << num_atomic_locks; } atomic_locks = (pthread_mutex_t *) PR_Malloc(sizeof(pthread_mutex_t) * num_atomic_locks); diff --git a/pr/src/pthreads/ptthread.c b/pr/src/pthreads/ptthread.c index b3fc704c..c2f72571 100644 --- a/pr/src/pthreads/ptthread.c +++ b/pr/src/pthreads/ptthread.c @@ -604,7 +604,6 @@ PR_IMPLEMENT(void) PR_SetThreadPriority(PRThread *thred, PRThreadPriority newPri PR_ASSERT(0 == rv); schedule.sched_priority = pt_PriorityMap(newPri); rv = pthread_setschedparam(thred->id, policy, &schedule); - PR_ASSERT(0 == rv || EPERM == rv); if (EPERM == rv) { pt_schedpriv = EPERM; diff --git a/pr/tests/Makefile b/pr/tests/Makefile index 819875e2..fbd637cf 100644 --- a/pr/tests/Makefile +++ b/pr/tests/Makefile @@ -472,13 +472,13 @@ clean:: ifeq ($(USE_PTHREADS), 1) $(OBJDIR)/foreign: $(OBJDIR)/foreign.o - $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@ + $(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@ $(OBJDIR)/provider: $(OBJDIR)/provider.o - $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@ + $(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@ $(OBJDIR)/socket: $(OBJDIR)/socket.o - $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@ + $(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@ $(OBJDIR)/testfile: $(OBJDIR)/testfile.o - $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@ + $(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@ endif # diff --git a/pr/tests/socket.c b/pr/tests/socket.c index c06b2c92..ec18f7f7 100644 --- a/pr/tests/socket.c +++ b/pr/tests/socket.c @@ -283,7 +283,7 @@ PRInt32 native_thread = 0; if (native_thread) { #if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) pthread_t tid; - if (!pthread_create(&tid, NULL, start, arg)) + if (!pthread_create(&tid, NULL, (void * (*)(void *)) start, arg)) return((PRThread *) tid); else return (NULL); diff --git a/pr/tests/testfile.c b/pr/tests/testfile.c index 544f320b..886973c0 100644 --- a/pr/tests/testfile.c +++ b/pr/tests/testfile.c @@ -132,7 +132,6 @@ PRInt32 native_thread = 0; if (native_thread) { #if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) pthread_t tid; - printf("creating pthread\n"); if (!pthread_create(&tid, NULL, start, arg)) return((PRThread *) tid); else @@ -304,6 +303,19 @@ char tmpname[1024]; rv = -1; goto cleanup; } + if (PR_GetOpenFileInfo(fd_file, &file_info) < 0) { + printf("testfile PR_GetFileInfo failed on file %s\n",pathname); + goto cleanup; + } + if (LL_NE(file_info.creationTime , file_info1.creationTime)) { + printf( + "testfile PR_GetFileInfo returned incorrect status-change time: %s\n", + pathname); + printf("ft = %lld, ft1 = %lld\n",file_info.creationTime, + file_info1.creationTime); + rv = -1; + goto cleanup; + } len = PR_Write(fd_file, out_buf->data, CHUNK_SIZE); if (len < 0) { printf("testfile failed to write to file %s\n",pathname); @@ -321,19 +333,12 @@ char tmpname[1024]; rv = -1; goto cleanup; } - if (LL_NE(file_info.creationTime , file_info1.creationTime)) { - printf( - "testfile PR_GetFileInfo returned incorrect creation time: %s\n", - pathname); - printf("ft = %lld, ft1 = %lld\n",file_info.creationTime, - file_info1.creationTime); - rv = -1; - goto cleanup; - } - if (LL_CMP(file_info.modifyTime, > , file_info1.modifyTime)) { + if (LL_CMP(file_info.modifyTime, < , file_info1.modifyTime)) { printf( "testfile PR_GetFileInfo returned incorrect modify time: %s\n", pathname); + printf("ft = %lld, ft1 = %lld\n",file_info.modifyTime, + file_info1.modifyTime); rv = -1; goto cleanup; } |