develooper Front page | perl.perl5.porters | Postings from July 2003

[PATCH] Compilation fix for 5.8.1-RC2 on HP-UX 11.00 re: get_seed ()

Thread Next
From:
ek9635
Date:
July 17, 2003 09:03
Subject:
[PATCH] Compilation fix for 5.8.1-RC2 on HP-UX 11.00 re: get_seed ()
Message ID:
B0A5D86FE2A73B41AD597E8A7DB08C63234BEF@misout7msgusr05.itservices.sbc.com
The following patch will allow perl 5.8.1-RC2 to compile on HP-UX 11.00.
There was a conflict with a system function get_seed() (located in
/usr/include/prot.h) and perl's get_seed() function (which is the hash
randomizer?).  This patch simply renames get_seed() to get_hash_seed() in
the following files:

embed.fnc
embed.h
proto.h
perl.c
util.c

Eric Kidder
office: 317 265 3190
pager: 317 692 4503
home: 317 299 8893

diff -ruN perl-5.8.1-RC2/embed.fnc perl-patched/embed.fnc
--- perl-5.8.1-RC2/embed.fnc    2003-07-10 20:18:16.000000000 -0500
+++ perl-patched/embed.fnc      2003-07-17 10:55:53.000000000 -0500
@@ -854,7 +854,7 @@
 p      |I32    |wait4pid       |Pid_t pid|int* statusp|int flags
 p      |U32    |parse_unicode_opts|char **popt
 p      |U32    |seed
-p      |UV     |get_seed
+p      |UV     |get_hash_seed
 p      |void   |report_evil_fh |GV *gv|IO *io|I32 op
 pd     |void   |report_uninit
 Afpd   |void   |warn           |const char* pat|...
diff -ruN perl-5.8.1-RC2/embed.h perl-patched/embed.h
--- perl-5.8.1-RC2/embed.h      2003-07-11 01:31:57.000000000 -0500
+++ perl-patched/embed.h        2003-07-17 10:57:20.000000000 -0500
@@ -1135,7 +1135,7 @@
 #define seed                   Perl_seed
 #endif
 #ifdef PERL_CORE
-#define get_seed               Perl_get_seed
+#define get_hash_seed          Perl_get_hash_seed
 #endif
 #ifdef PERL_CORE
 #define report_evil_fh         Perl_report_evil_fh
@@ -3649,7 +3649,7 @@
 #define seed()                 Perl_seed(aTHX)
 #endif
 #ifdef PERL_CORE
-#define get_seed()             Perl_get_seed(aTHX)
+#define get_hash_seed()                Perl_get_hash_seed(aTHX)
 #endif
 #ifdef PERL_CORE
 #define report_evil_fh(a,b,c)  Perl_report_evil_fh(aTHX_ a,b,c)
diff -ruN perl-5.8.1-RC2/perl.c perl-patched/perl.c
--- perl-5.8.1-RC2/perl.c       2003-07-11 01:25:21.000000000 -0500
+++ perl-patched/perl.c 2003-07-17 10:56:27.000000000 -0500
@@ -1033,7 +1033,7 @@
      * If you set PL_hash_seed (and assumedly also PL_hash_seed_set)
yourself,
      * it is your responsibility to provide a good random seed! */
     if (!PL_hash_seed_set)
-        PL_hash_seed = get_seed();
+        PL_hash_seed = get_hash_seed();
     {
         char *s = PerlEnv_getenv("PERL_HASH_SEED_DEBUG");

diff -ruN perl-5.8.1-RC2/proto.h perl-patched/proto.h
--- perl-5.8.1-RC2/proto.h      2003-07-11 01:31:57.000000000 -0500
+++ perl-patched/proto.h        2003-07-17 10:57:03.000000000 -0500
@@ -814,7 +814,7 @@
 PERL_CALLCONV I32      Perl_wait4pid(pTHX_ Pid_t pid, int* statusp, int
flags);
 PERL_CALLCONV U32      Perl_parse_unicode_opts(pTHX_ char **popt);
 PERL_CALLCONV U32      Perl_seed(pTHX);
-PERL_CALLCONV UV       Perl_get_seed(pTHX);
+PERL_CALLCONV UV       Perl_get_hash_seed(pTHX);
 PERL_CALLCONV void     Perl_report_evil_fh(pTHX_ GV *gv, IO *io, I32 op);
 PERL_CALLCONV void     Perl_report_uninit(pTHX);
 PERL_CALLCONV void     Perl_warn(pTHX_ const char* pat, ...)
diff -ruN perl-5.8.1-RC2/util.c perl-patched/util.c
--- perl-5.8.1-RC2/util.c       2003-07-10 20:49:49.000000000 -0500
+++ perl-patched/util.c 2003-07-17 10:56:20.000000000 -0500
@@ -4360,7 +4360,7 @@
 }

 UV
-Perl_get_seed(pTHX)
+Perl_get_hash_seed(pTHX)
 {
      char *s = PerlEnv_getenv("PERL_HASH_SEED");
      UV myseed = 0;

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About