This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
AIX threaded build, plus few more on the side.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 5 Jul 1999 17:17:22 +0000 (17:17 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 5 Jul 1999 17:17:22 +0000 (17:17 +0000)
p4raw-id: //depot/cfgperl@3592

12 files changed:
embed.h
embed.pl
ext/DynaLoader/dl_aix.xs
ext/DynaLoader/dl_next.xs
ext/DynaLoader/dl_rhapsody.xs
ext/DynaLoader/dl_vms.xs
hints/aix.sh
objXSUB.h
perl.h
perl_exp.SH
proto.h
util.c

diff --git a/embed.h b/embed.h
index 767b707..d0ede0b 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define mod                    Perl_mod
 #define moreswitches           Perl_moreswitches
 #define my                     Perl_my
-#ifdef USE_LOCALE_NUMERIC
 #define my_atof                        Perl_my_atof
-#endif
 #if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
 #define my_bcopy               Perl_my_bcopy
 #endif
 #define mod(a,b)               Perl_mod(aTHX_ a,b)
 #define moreswitches(a)                Perl_moreswitches(aTHX_ a)
 #define my(a)                  Perl_my(aTHX_ a)
-#ifdef USE_LOCALE_NUMERIC
 #define my_atof(a)             Perl_my_atof(aTHX_ a)
-#endif
 #if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
 #define my_bcopy(a,b,c)                Perl_my_bcopy(aTHX_ a,b,c)
 #endif
 #define moreswitches           Perl_moreswitches
 #define Perl_my                        CPerlObj::Perl_my
 #define my                     Perl_my
-#ifdef USE_LOCALE_NUMERIC
 #define Perl_my_atof           CPerlObj::Perl_my_atof
 #define my_atof                        Perl_my_atof
-#endif
 #if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
 #define Perl_my_bcopy          CPerlObj::Perl_my_bcopy
 #define my_bcopy               Perl_my_bcopy
index d96158e..d7c5a87 100755 (executable)
--- a/embed.pl
+++ b/embed.pl
@@ -1058,9 +1058,7 @@ p |I32    |mg_size        |SV* sv
 p      |OP*    |mod            |OP* o|I32 type
 p      |char*  |moreswitches   |char* s
 p      |OP*    |my             |OP* o
-#ifdef USE_LOCALE_NUMERIC
 p      |double |my_atof        |const char *s
-#endif
 #if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
 p      |char*  |my_bcopy       |const char* from|char* to|I32 len
 #endif
index 69fb7a7..78e4343 100644 (file)
@@ -153,6 +153,7 @@ char *strerrorcpy(char *str, int err) {
 /* ARGSUSED */
 void *dlopen(char *path, int mode)
 {
+       dTHX;
        register ModulePtr mp;
        static int inited;                      /* XXX threadead */
 
@@ -366,6 +367,7 @@ void *calloc(size_t ne, size_t sz)
  */
 static int readExports(ModulePtr mp)
 {
+       dTHX;
        LDFILE *ldp = NULL;
        SCNHDR sh;
        LDHDR *lhp;
index 114489a..ec01d60 100644 (file)
@@ -72,6 +72,7 @@ enum dyldErrorSource
 static void TranslateError
     (const char *path, enum dyldErrorSource type, int number)
 {
+    dTHX;
     char *error;
     unsigned int index;
     static char *OFIErrorStrings[] =
index 76ecb05..223d7f6 100644 (file)
@@ -64,6 +64,7 @@ enum dyldErrorSource
 static void TranslateError
     (const char *path, enum dyldErrorSource type, int number)
 {
+    dTHX;
     char *error;
     unsigned int index;
     static char *OFIErrorStrings[] =
index 3640b0f..4db0cc9 100644 (file)
@@ -228,6 +228,7 @@ dl_load_file(filespec, flags)
     char *     filespec
     int                flags
     PREINIT:
+    DTHX;
     char vmsspec[NAM$C_MAXRSS];
     SV *reqSV, **reqSVhndl;
     STRLEN deflen;
index 581141d..fcf4adb 100644 (file)
@@ -106,10 +106,10 @@ esac
 #                           symbol: boot_$(EXP)  can it be auto-generated?
 case "$osvers" in
 3*) 
-    lddlflags="$lddlflags -H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -e _nostart"
+    lddlflags="$lddlflags -H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -e _nostart -lc"
     ;;
 *) 
-    lddlflags="$lddlflags -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry"
+    lddlflags="$lddlflags -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lc"
     ;;
 esac
 
@@ -161,8 +161,6 @@ for arg in $ccflags ; do
 
 done
 
-lddllibc="-lc"
-
 # This script UU/usethreads.cbu will get 'called-back' by Configure 
 # after it has prompted the user for whether to use threads.
 cat > UU/usethreads.cbu <<'EOCBU'
@@ -192,11 +190,12 @@ EOM
            ;;
         esac
 
-        # Add the POSIX threads library and the re-entrant libc.
-
-        lddllibc="-lpthreads -lc_r"
+        # Add the POSIX threads library and the re-entrant libc to lddflags.
+        set `echo X "$lddlflags"| sed -e 's/ -lc$/ -lpthreads -lc_r/'`
+        shift
+        lddlflags="$*"
 
-        # Add the c_r library to the list of wanted libraries.
+        # Add the POSIX threads library and the re-entrant libc to libswanted.
         # Make sure the c_r library is before the c library or
         # make will fail.
         set `echo X "$libswanted "| sed -e 's/ c / pthreads c_r /'`
@@ -204,11 +203,8 @@ EOM
         libswanted="$*"
        ;;
 esac
-
 EOCBU
 
-lddlflags="$lddlflags $lddllibc"
-
 # This script UU/use64bits.cbu will get 'called-back' by Configure 
 # after it has prompted the user for whether to use 64 bits.
 cat > UU/use64bits.cbu <<'EOCBU'
@@ -232,3 +228,5 @@ EOM
            ;;
 esac
 EOCBU
+
+# EOF
index 1e37e0b..d14de86 100644 (file)
--- a/objXSUB.h
+++ b/objXSUB.h
 #define Perl_my                        pPerl->Perl_my
 #undef  my
 #define my                     Perl_my
-#ifdef USE_LOCALE_NUMERIC
 #undef  Perl_my_atof
 #define Perl_my_atof           pPerl->Perl_my_atof
 #undef  my_atof
 #define my_atof                        Perl_my_atof
-#endif
 #if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
 #undef  Perl_my_bcopy
 #define Perl_my_bcopy          pPerl->Perl_my_bcopy
diff --git a/perl.h b/perl.h
index cfa97cb..558d423 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -2870,7 +2870,7 @@ typedef struct am_table_short AMTS;
 
 #define RESTORE_NUMERIC_LOCAL()                if ((PL_hints & HINT_LOCALE) && PL_numeric_standard) SET_NUMERIC_LOCAL()
 #define RESTORE_NUMERIC_STANDARD()     if ((PL_hints & HINT_LOCALE) && PL_numeric_local) SET_NUMERIC_STANDARD()
-#define Atof(s)                                Perl_my_atof(s)
+#define Atof                           my_atof
 
 #else /* !USE_LOCALE_NUMERIC */
 
@@ -2879,7 +2879,7 @@ typedef struct am_table_short AMTS;
 #define IS_NUMERIC_RADIX(c)            (0)
 #define RESTORE_NUMERIC_LOCAL()                /**/
 #define RESTORE_NUMERIC_STANDARD()     /**/
-#define Atof(s)                                atof(s)
+#define Atof                           atof
 
 #endif /* !USE_LOCALE_NUMERIC */
 
index 436bfd1..f467884 100644 (file)
@@ -77,9 +77,13 @@ fi
 #cat >>perl.exp <<END
 #END
 
+case "$usemymalloc" in
+true|[yY]*) usemymalloc=define ;;
+esac
+
 # Remove mymalloc if needed.
 case "$usemymalloc$d_mymalloc" in
-ydefine) ;;
+definedefine) ;;
 *)
        egrep -v '^(Perl_(calloc|malloc|malloced_size|mfree|realloc|safexcalloc|safexfree|safexmalloc|safexrealloc)|^PL_malloc_mutex)$' < perl.exp > perl.exp$$
        mv -f perl.exp$$ perl.exp
@@ -97,9 +101,13 @@ esac
 egrep -v '^(Perl_my_(bcopy|bzero|chsize|htonl|memcmp|memset|ntohl|swap))$' < perl.exp > perl.exp$$
 mv -f perl.exp$$ perl.exp
 
+case "$usethreads" in
+true|[yY]*) usethreads=define ;;
+esac
+
 # Remove thread symbols if needed.
 case "$usethreads" in
-y)     ;;
+define)        ;;
 *)
        egrep -v '^(Perl_(condpair_magic|find_threadsv|magic_mutexfree|new_struct_thread|unlock_condpair)|^PL_((eval|nthreads)_cond|curthr|eval_owner|(cred|eval|strtab|sv|svref|threads|malloc|vtbl)_mutex|nthreads|threadnum|threadsv_names|thr_key|thrsv))$' < perl.exp > perl.exp$$
        mv -f perl.exp$$ perl.exp
diff --git a/proto.h b/proto.h
index 54d71e6..95ffda5 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -307,9 +307,7 @@ VIRTUAL I32 Perl_mg_size(pTHX_ SV* sv);
 VIRTUAL OP*    Perl_mod(pTHX_ OP* o, I32 type);
 VIRTUAL char*  Perl_moreswitches(pTHX_ char* s);
 VIRTUAL OP*    Perl_my(pTHX_ OP* o);
-#ifdef USE_LOCALE_NUMERIC
 VIRTUAL double Perl_my_atof(pTHX_ const char *s);
-#endif
 #if !defined(HAS_BCOPY) || !defined(HAS_SAFE_BCOPY)
 VIRTUAL char*  Perl_my_bcopy(pTHX_ const char* from, char* to, I32 len);
 #endif
diff --git a/util.c b/util.c
index 28776ab..3655cef 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1489,7 +1489,7 @@ Perl_die_nocontext(const char* pat, ...)
     OP *o;
     va_list args;
     va_start(args, pat);
-    o = do_die(aTHX_ pat, &args);
+    o = do_die(pat, &args);
     va_end(args);
     return o;
 }
@@ -1501,7 +1501,7 @@ Perl_die(pTHX_ const char* pat, ...)
     OP *o;
     va_list args;
     va_start(args, pat);
-    o = do_die(aTHX_ pat, &args);
+    o = do_die(pat, &args);
     va_end(args);
     return o;
 }
@@ -3507,7 +3507,7 @@ Perl_my_fflush_all(pTHX)
 }
 
 double
-Perl_my_atof(const char* s) {
+Perl_my_atof(pTHX_ const char* s) {
 #ifdef USE_LOCALE_NUMERIC
     if ((PL_hints & HINT_LOCALE) && PL_numeric_local) {
        double x, y;