z/OS: changes for building threaded from "Brian De Pradine"
Jarkko Hietaniemi [Tue, 22 Apr 2003 13:09:21 +0000 (13:09 +0000)]
<PRADINE@uk.ibm.com>.

p4raw-id: //depot/perl@19306

Makefile.SH
hints/os390.sh
thread.h
util.c

index 9b1b7f8..d9d6088 100644 (file)
@@ -1223,6 +1223,11 @@ os390|posix-bc)
             -e 's/y\.tab/perly/g' perly.c >perly.tmp && mv perly.tmp perly.c
         xxx="$xxx perly.c"
     fi
+    case "$osname:$usethreads" in
+    os390:define)
+       sed -e 's@^extern int yychar, yyerrflag;@/* extern int yychar, yyerrflag; */@' perly.c > perly.tmp && mv perly.tmp perly.c
+       ;;
+    esac
     if cmp -s y.tab.h perly.h; then
         rm -f y.tab.h
     else
index 02f75ea..422600f 100644 (file)
@@ -131,6 +131,9 @@ esac
 case "$i_systime" in
 '') i_systime='define' ;;
 esac
+case "$d_pthread_atfork" in                                                  
+'') d_pthread_atfork='undef' ;;                                              
+esac                                                                         
 
 # (from aix.sh)
 # uname -m output is too specific and not appropriate here
index bd4b910..3f7b2df 100644 (file)
--- a/thread.h
+++ b/thread.h
 #ifdef HAS_PTHREAD_UNCHECKED_GETSPECIFIC_NP
 #  define PTHREAD_GETSPECIFIC(key) pthread_unchecked_getspecific_np(key)
 #else
-#  define PTHREAD_GETSPECIFIC(key) pthread_getspecific(key)
+#  ifdef OEMVS
+#    define PTHREAD_GETSPECIFIC(key) pthread_getspecific_d8_np(key)
+#  else
+#    define PTHREAD_GETSPECIFIC(key) pthread_getspecific(key)
+#  endif
 #endif
 
 #ifndef PERL_GET_CONTEXT
diff --git a/util.c b/util.c
index 5e63d11..ab1d6dc 100644 (file)
--- a/util.c
+++ b/util.c
@@ -3683,7 +3683,7 @@ Perl_scan_vstring(pTHX_ char *s, SV *sv)
            }
 #ifdef EBCDIC
            if (rev > 0x7FFFFFFF)
-                Perl_croak(aTHX "In EBCDIC the v-string components cannot exceed 2147483647");
+                Perl_croak(aTHX_ "In EBCDIC the v-string components cannot exceed 2147483647");
 #endif
            /* Append native character for the rev point */
            tmpend = uvchr_to_utf8(tmpbuf, rev);