Closed
Bug 48308
Opened 26 years ago
Closed 21 years ago
Port NSPR pthreads code to UnixWare 7.
Categories
(NSPR :: NSPR, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
4.6
People
(Reporter: wtc, Assigned: mozbugs-build)
References
Details
Attachments
(4 files)
|
5.60 KB,
patch
|
Details | Diff | Splinter Review | |
|
10.18 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.15 KB,
patch
|
Details | Diff | Splinter Review | |
|
4.71 KB,
patch
|
Details | Diff | Splinter Review |
This bug is used to track the porting of NSPR
pthreads code to UnixWare 7. I took a stab at
it a while ago but didn't finish it. I will
attach my unfinished work.
| Reporter | ||
Comment 1•26 years ago
|
||
| Reporter | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
| Reporter | ||
Updated•26 years ago
|
Target Milestone: --- → Future
Comment 2•24 years ago
|
||
This allows nsprpub to build in OpenUNIX8 (Caldera version of UnixWare7)
with the /usr/gnu toolchain and with -pthreads. All the tests pass except:
nameshm1, sema, semaerr, semaping
cvar appears to fail, but it just needs a good -c 100000 or -c 1000000
to be OK. (machines are too fast for cvar)
--Hiram - hiramc@caldera.com
| Reporter | ||
Comment 3•24 years ago
|
||
Comment on attachment 62593 [details] [diff] [review]
Brings nsprpub up to OpenUNIX8 build with pthreads
nsprpub/config/arch.mk is obsolete, so it's not necessary
to patch it. (I still keep the obsolete files in
nsprpub/config around as a reference.)
I checked in your changes to _pth.h, ptio.c, and ptthread.c.
>Index: mozilla/nsprpub/pr/include/md/_unixware.h
>===================================================================
>RCS file: /cvsroot/mozilla/nsprpub/pr/include/md/_unixware.h,v
>retrieving revision 3.6
>diff -u -r3.6 _unixware.h
>--- mozilla/nsprpub/pr/include/md/_unixware.h 2000/06/20 21:24:34 3.6
>+++ mozilla/nsprpub/pr/include/md/_unixware.h 2001/12/22 00:16:04
>@@ -60,7 +60,9 @@
> #define HAVE_NETCONFIG
> #define HAVE_DLL
> #define USE_DLFCN
>+#if ! defined(HAVE_STRERROR)
> #define HAVE_STRERROR
>+#endif
> #define NEED_STRFTIME_LOCK
> #define NEED_TIME_R
> #define _PR_NEED_STRCASECMP
>@@ -178,7 +180,7 @@
> #define _MD_FREE_LOCK(lock)
> #define _MD_LOCK(lock)
> #define _MD_UNLOCK(lock)
>-#define _MD_INIT_IO()
>+#define _MD_INIT_IO _MD_InitIO
> #define _MD_IOQ_LOCK()
> #define _MD_IOQ_UNLOCK()
>
The first change is not necessary.
The second change is needed only when USE_SVR4_THREADS
is defined. It should be protected by an ifdef:
#ifdef USE_SVR4_THREADS
#define _MD_INIT_IO _MD_InitIO
#else
#define _MD_INIT_IO()
#endif
Since we are only interested in the _PR_PTHREADS
build now, I suggest that we just leave the
USE_SVR4_THREADS build broken.
Most of your changes to nsprpub/pr/src/md/unix/unixware.c
are stylistic changes. Did you try the change to this
file in my patch?
>Index: mozilla/nsprpub/pr/tests/Makefile.in
>===================================================================
>RCS file: /cvsroot/mozilla/nsprpub/pr/tests/Makefile.in,v
>retrieving revision 1.35
>diff -u -r1.35 Makefile.in
>--- mozilla/nsprpub/pr/tests/Makefile.in 2001/10/26 04:55:56 1.35
>+++ mozilla/nsprpub/pr/tests/Makefile.in 2001/12/22 00:16:04
>@@ -396,6 +396,13 @@
> export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR)
> endif
>
>+ifeq ($(OS_ARCH), OpenUNIX)
>+OS_CFLAGS += -pthread
>+EXTRA_LIBS = -lsocket -lnsl
>+export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR)
>+XCFLAGS += -pthread
>+endif
>+
> ifeq ($(OS_ARCH), UNIXWARE)
> export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR)
> endif
>@@ -424,7 +431,7 @@
> ifeq ($(OS_ARCH),AIX)
> LIBPTHREAD = -lpthreads
> endif
>-ifeq (,$(filter-out FreeBSD OpenBSD BSD_OS NTO Darwin,$(OS_ARCH)))
>+ifeq (,$(filter-out OpenUNIX FreeBSD OpenBSD BSD_OS NTO Darwin,$(OS_ARCH)))
> LIBPTHREAD =
> endif
> ifeq ($(OS_ARCH)$(basename $(OS_RELEASE)),HP-UXB.10)
I checked in a variant of this patch. Let me know if it works.
>Index: mozilla/nsprpub/configure.in
>===================================================================
>RCS file: /cvsroot/mozilla/nsprpub/configure.in,v
>retrieving revision 1.95
>diff -u -r1.95 configure.in
>--- mozilla/nsprpub/configure.in 2001/12/07 02:10:08 1.95
>+++ mozilla/nsprpub/configure.in 2001/12/22 00:16:04
>@@ -219,6 +219,11 @@
> dnl ========================================================
> case "$target" in
>
>+*-sysv5OpenUNIX8*)
>+ CFLAGS="$CFLAGS -fPIC -pthread"
>+ CXXFLAGS="$CXXFLAGS -fPIC -pthread"
>+ ;;
>+
> *-aix*)
> case "${target_os}" in
> aix3.2*)
>@@ -728,8 +733,23 @@
> fi
> PR_MD_CSRCS=aix.c
> RESOLVE_LINK_SYMBOLS=1
>+ ;;
>+
>+*-sysv5OpenUNIX8*)
>+ AC_DEFINE(XP_UNIX)
>+ AC_DEFINE(UNIXWARE)
>+ AC_DEFINE(SVR4)
>+ AC_DEFINE(SYSV)
>+ AC_DEFINE(_LARGEFILE64_SOURCE)
>+ AC_DEFINE(_PR_HAVE_OFF64_T)
>+ AC_DEFINE(_PR_HAVE_SOCKADDR_LEN)
>+ MDCPUCFG_H=_unixware7.cfg
>+ PR_MD_CSRCS=unixware.c
>+ DSO_LDOPTS='-G -z text -h $(notdir $@)'
>+ CPU_ARCH=x86
>+ OS_LIBS="$OS_LIBS -lsocket -lnsl"
> ;;
>-
>+
> *-beos*)
> AC_DEFINE(XP_BEOS)
> AC_DEFINE(BeOS)
I will let Chris Seawood to review this change. Since
OpenUNIX8 is close to UnixWare 7, is there a way to
handle it in the same case as UnixWare 7?
Attachment #62593 -
Flags: needs-work+
| Reporter | ||
Comment 4•24 years ago
|
||
Chris, could you work on this bug? Thanks.
Assignee: wtc → seawood
Status: ASSIGNED → NEW
| Reporter | ||
Updated•24 years ago
|
Priority: P3 → P2
Updated•24 years ago
|
Status: NEW → ASSIGNED
Comment 5•24 years ago
|
||
This patch merges the existing -sco-sysv5* section with the proposed
-sysv5OpenUNIX* section. Since wtc was moving to pthreads for unixware7, I
moved the hardcoded USE_NSPR_THREADS into the unixware 2.1 section. -pthread
should be added automatically by the test further down in configure.in . If it
is not being added, please attach the config.log from that build.
| Reporter | ||
Comment 6•24 years ago
|
||
Comment on attachment 64025 [details] [diff] [review]
Use the existing unixware switch case & treat unixware7 & unixware 8 the same.
Question: I believe we need to add USE_PTHREADS=1 to
the UnixWare 7/8 section. Or is USE_THREADS set to 1
by default on systems that have pthreads? That seems
to be what the AC_ARG_WITH(pthreads) section of
mozilla/nsprpub/configure.in does.
Comment 7•24 years ago
|
||
*** Bug 117930 has been marked as a duplicate of this bug. ***
Comment 8•24 years ago
|
||
You are correct. We need to add USE_PTHREADS=1 to the 7/8 section. The
AC_ARG_WITH(pthread,...) allows us to attempt to use pthreads on systems that
support both pthreads & nspr-threads but default to nspr-threads (I'm actually
not sure if that's needed any longer).
Comment 9•24 years ago
|
||
Chris, Wan-Teh:
I have included the OpenUNIX business within the existing UnixWare 2 case in
configure.in as you mentioned. The configure works OK like this.
The part at the top of configure.in, near line 219, is because detection
of threads is done by compiling _AND_ linking with -pthread and the configure
doesn't get to checking that -pthread is OK on a compile line until _AFTER_
checking for threads, so I need to have -pthread there all the time during
the initial phases of configure so it will find the pthread_create symbol as
it tests linking with -lc
Also included is one extra line to pr/tests/Makefile.in so the test
cases will link with the correct system libraries.
The ifdef protection in _unixware.h around HAVE_STRERROR is to help
prevent thousands of compile warnings as the source tree is built.
And even though my changes to unixware.c are somewhat cosmetic, I would
sure like to have them in there because it makes it a lot easier for
me (and subsequently anyone else) to see where all the ifdefs are in
this file. There are actually a couple of important patches to
unixware.c that make it work. Please include all of these changes since
they are really for me and any maintainers that follow.
Thanks for your assistance,
--Hiram
Comment 10•23 years ago
|
||
Mass reassign to new default build assignee
Assignee: seawood → mozbugs-build
Status: ASSIGNED → NEW
Priority: P2 → --
Comment 11•23 years ago
|
||
*** Bug 128783 has been marked as a duplicate of this bug. ***
| Reporter | ||
Comment 12•21 years ago
|
||
Marked the bug WONTFIX. This bug "fell through the
cracks" after 2002-01-14. I am not sure if anyone
is still interested in porting NSPR to UnixWare 7.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WONTFIX
Target Milestone: Future → 4.6
You need to log in
before you can comment on or make changes to this bug.
Description
•