Configure -Dusethreads hints for dec_osf and solaris_2 and
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>
Thu, 2 Oct 1997 16:58:47 +0000 (16:58 +0000)
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>
Thu, 2 Oct 1997 16:58:47 +0000 (16:58 +0000)
fix sv_bless3 prototype.

p4raw-id: //depot/perl@96

hints/dec_osf.sh
hints/solaris_2.sh
sv.c

index 0ba4dad..fa7596b 100644 (file)
@@ -161,6 +161,16 @@ case "$optimize" in
        ;;
 esac
 
+if [ "X$usethreads" != "X" ]; then
+    ccflags="-DUSE_THREADS $ccflags"
+    optimize="-pthread $optimize"
+    ldflags="-pthread $ldflags"
+    set `echo X "$libswanted "| sed -e 's/ c / pthread c_r /'`
+    shift
+    libswanted="$*"
+    usemymalloc='n'
+fi
+
 #
 # Unset temporary variables no more needed.
 #
index d2124ed..21593f1 100644 (file)
@@ -223,6 +223,18 @@ esac
 # as --version or ld --version might dump core.
 rm -f core
 
+if [ "X$usethreads" != "X" ]; then
+    ccflags="-D_REENTRANT -DUSE_THREADS $ccflags"
+    cppflags="-D_REENTRANT -DUSE_THREADS $cppflags"
+    # -lpthread needs to come before -lc but after other libraries such
+    # as -lgdbm and such like. We assume here that -lc is present in
+    # libswanted. If that fails to be true in future, then this can be
+    # changed to add pthread to the very end of libswanted.
+    set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
+    shift
+    libswanted="$*"
+fi
+
 # This is just a trick to include some useful notes.
 cat > /dev/null <<'End_of_Solaris_Notes'
 
diff --git a/sv.c b/sv.c
index 8668d1c..bdc3c71 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -4044,10 +4044,14 @@ I32 n;
 }
 
 SV*
+#ifndef CAN_PROTOTYPE
 sv_bless3(sv,stash,zaptilde)
 SV* sv;
 HV* stash;
 bool zaptilde;
+#else
+sv_bless3(SV *sv, HV *stash, bool zaptilde)
+#endif /* CAN_PROTOTYPE */
 {
     dTHR;
     SV *ref;