From: Chuck D. Phillips Date: Mon, 5 May 1997 05:48:39 +0000 (-0600) Subject: HPUX: patch for ext/DynaLoader/dl_hpux.xs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b13ecc090d5cf4072407e393a4f356f8f10dbce4;p=p5sagit%2Fp5-mst-13.2.git HPUX: patch for ext/DynaLoader/dl_hpux.xs By default, doing a "make test" on a dynamically loaded module with unresolved symbols will result with a useless error message. Adding the BIND_VERBOSE flag will add the names of undefined symbols to the error message already printed to stderr. This does *not* affect default operation; only when PERL_DL_NONLAZY is set does it make a p5p-msgid: 199705050548.WAA21260@palrel1.hp.com --- diff --git a/ext/DynaLoader/dl_hpux.xs b/ext/DynaLoader/dl_hpux.xs index fea6284..51d464e 100644 --- a/ext/DynaLoader/dl_hpux.xs +++ b/ext/DynaLoader/dl_hpux.xs @@ -3,6 +3,14 @@ * Version: 2.1, 1995/1/25 */ +/* o Added BIND_VERBOSE to dl_nonlazy condition to add names of missing + * symbols to stderr message on fatal error. + * + * o Added BIND_NONFATAL comment to default condition. + * + * Chuck Phillips (cdp@fc.hp.com) + * Version: 2.2, 1997/5/4 */ + #ifdef __hp9000s300 #define magic hpux_magic #define MAGIC HPUX_MAGIC @@ -48,10 +56,15 @@ dl_load_file(filename, flags=0) DLDEBUG(1,PerlIO_printf(PerlIO_stderr(), "dl_load_file(%s,%x):\n", filename,flags)); if (flags & 0x01) warn("Can't make loaded symbols global on this platform while loading %s",filename); - if (dl_nonlazy) - bind_type = BIND_IMMEDIATE; - else - bind_type = BIND_DEFERRED; + if (dl_nonlazy) { + bind_type = BIND_IMMEDIATE|BIND_VERBOSE; + } else { + bind_type = BIND_DEFERRED; + /* For certain libraries, like DCE, deferred binding often causes run + * time problems. Adding BIND_NONFATAL to BIND_IMMEDIATE still allows + * unresolved references in situations like this. */ + /* bind_type = BIND_IMMEDIATE|BIND_NONFATAL; */ + } #ifdef DEBUGGING if (dl_debug) bind_type |= BIND_VERBOSE;