Another update from the internal CVS repository /m/src.

This commit is contained in:
wtc%netscape.com 1999-03-09 05:12:06 +00:00
Родитель 9f6584c6ca
Коммит a48a204528
10 изменённых файлов: 34 добавлений и 25 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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];

Просмотреть файл

@ -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.
**

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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);

Просмотреть файл

@ -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;

Просмотреть файл

@ -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
#

Просмотреть файл

@ -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);

Просмотреть файл

@ -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;
}