diff options
author | skrll <skrll@pkgsrc.org> | 2002-08-01 13:36:08 +0000 |
---|---|---|
committer | skrll <skrll@pkgsrc.org> | 2002-08-01 13:36:08 +0000 |
commit | 459f021fc921a8073ff729e7f0d249bd81bf2906 (patch) | |
tree | ec7973d73439932733ebbb61113c41842877c918 /devel/pth | |
parent | e763010bd897159e8999fcf27b17a3f65add9296 (diff) | |
download | pkgsrc-459f021fc921a8073ff729e7f0d249bd81bf2906.tar.gz |
Apply a fix to the initialization routine so that make test works with
--enable-syscall-hard.
Allow -O2 optimisation of i386 - the reason this was removed is somewhat
bogus.
Bump PKGREVISION.
Diffstat (limited to 'devel/pth')
-rw-r--r-- | devel/pth/Makefile | 7 | ||||
-rw-r--r-- | devel/pth/distinfo | 3 | ||||
-rw-r--r-- | devel/pth/patches/patch-ag | 82 |
3 files changed, 86 insertions, 6 deletions
diff --git a/devel/pth/Makefile b/devel/pth/Makefile index 9d881589f71..91bb4c581d5 100644 --- a/devel/pth/Makefile +++ b/devel/pth/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.45 2002/08/01 05:58:00 jlam Exp $ +# $NetBSD: Makefile,v 1.46 2002/08/01 13:36:08 skrll Exp $ # DISTNAME= pth-1.4.1 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNU:=pth/} @@ -20,9 +20,6 @@ CONFIGURE_ARGS+= --enable-pthread CONFIGURE_ARGS+= --enable-syscall-hard CONFIG_GUESS_OVERRIDE= ${WRKSRC}/config.guess CONFIG_SUB_OVERRIDE= ${WRKSRC}/config.sub -.if (${MACHINE_ARCH} == "i386" && ${CFLAGS:M-O2} == "-O2") -CFLAGS:= ${CFLAGS:S/-O2/-O0/} -.endif # for PLIST PTH_MAJOR= 14 diff --git a/devel/pth/distinfo b/devel/pth/distinfo index 68847ccc4e3..2cb0a4314c2 100644 --- a/devel/pth/distinfo +++ b/devel/pth/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.5 2002/03/24 18:47:39 dmcmahill Exp $ +$NetBSD: distinfo,v 1.6 2002/08/01 13:36:08 skrll Exp $ SHA1 (pth-1.4.1.tar.gz) = bc5b0847d57d2b78945a6c8d4ebab57e46213972 Size (pth-1.4.1.tar.gz) = 446287 bytes @@ -8,3 +8,4 @@ SHA1 (patch-ac) = 77202a5f9f39e63b24288051273a3518e80c47ec SHA1 (patch-ad) = 0f1e18cff418b066d37333578f2e5874741f2008 SHA1 (patch-ae) = fe0714f3d1c71f7f347ba217abf918cb7ea8f31b SHA1 (patch-af) = 95ab72c602d6b69e10de9e3218f4c455036f40ca +SHA1 (patch-ag) = f4c8673837c9b2a06bcd16eaf17ee3e755ebb158 diff --git a/devel/pth/patches/patch-ag b/devel/pth/patches/patch-ag new file mode 100644 index 00000000000..acce8bca0c7 --- /dev/null +++ b/devel/pth/patches/patch-ag @@ -0,0 +1,82 @@ +$NetBSD: patch-ag,v 1.1 2002/08/01 13:36:09 skrll Exp $ + +--- pth_lib.c.orig Sun Jan 27 11:03:40 2002 ++++ pth_lib.c +@@ -37,25 +37,21 @@ long pth_version(void) + + /* implicit initialization support */ + intern int pth_initialized = FALSE; ++intern int pth_explicit_initialize = FALSE; ++ + #if cpp + #define pth_implicit_init() \ + if (!pth_initialized) \ +- pth_init(); ++ pth__init(); + #endif + +-/* initialize the package */ +-int pth_init(void) ++intern int pth__init(void) + { + pth_attr_t t_attr; + +- /* support for implicit initialization calls +- and to prevent multiple explict initialization, too */ +- if (pth_initialized) +- return_errno(FALSE, EPERM); +- else +- pth_initialized = TRUE; ++ pth_initialized = TRUE; + +- pth_debug1("pth_init: enter"); ++ pth_debug1("pth__init: enter"); + + /* initialize the scheduler */ + pth_scheduler_init(); +@@ -105,10 +101,28 @@ int pth_init(void) + pth_mctx_switch(&pth_main->mctx, &pth_sched->mctx); + + /* came back, so let's go home... */ +- pth_debug1("pth_init: leave"); ++ pth_debug1("pth__init: leave"); + return TRUE; + } + ++/* initialize the package */ ++int pth_init(void) ++{ ++ int rv; ++ ++ /* support for implicit initialization calls ++ and to prevent multiple explict initialization, too */ ++ if (pth_initialized) { ++ /* if we've already explicitly initialized then error */ ++ if (pth_explicit_initialize) ++ return_errno(FALSE, EPERM); ++ } else { ++ rv = pth__init(); ++ pth_explicit_initialize = TRUE; ++ return rv; ++ } ++} ++ + /* kill the package internals */ + int pth_kill(void) + { +@@ -118,6 +132,7 @@ int pth_kill(void) + pth_thread_cleanup(pth_main); + pth_scheduler_kill(); + pth_initialized = FALSE; ++ pth_explicit_initialize = FALSE; + pth_tcb_free(pth_sched); + pth_tcb_free(pth_main); + pth_debug1("pth_kill: leave"); +@@ -182,6 +197,7 @@ static void pth_spawn_trampoline(void) + /* no return! */ + abort(); + } ++ + pth_t pth_spawn(pth_attr_t attr, void *(*func)(void *), void *arg) + { + pth_t t; |