From: Ilya Zakharevich Date: Sat, 19 May 2001 04:30:45 +0000 (-0400) Subject: DLL name mangling on OS/2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bea19d3fe5b254bd582228ebbf5d315c969caf0e;p=p5sagit%2Fp5-mst-13.2.git DLL name mangling on OS/2 Message-ID: <20010519043045.A17033@math.ohio-state.edu> p4raw-id: //depot/perl@10166 --- diff --git a/os2/os2.c b/os2/os2.c index 0112900..4e96002 100644 --- a/os2/os2.c +++ b/os2/os2.c @@ -1329,7 +1329,18 @@ mod2fname(pTHX_ SV *sv) #ifdef USE_THREADS sum++; /* Avoid conflict of DLLs in memory. */ #endif - sum += PERL_VERSION * 200 + PERL_SUBVERSION * 2; /* */ + /* We always load modules as *specific* DLLs, and with the full name. + When loading a specific DLL by its full name, one cannot get a + different DLL, even if a DLL with the same basename is loaded already. + Thus there is no need to include the version into the mangling scheme. */ +#if 0 + sum += PERL_VERSION * 200 + PERL_SUBVERSION * 2; /* Up to 5.6.1 */ +#else +# ifndef COMPATIBLE_VERSION_SUM /* Binary compatibility with the 5.00553 binary */ +# define COMPATIBLE_VERSION_SUM (5 * 200 + 53 * 2) +# endif + sum += COMPATIBLE_VERSION_SUM; +#endif fname[pos] = 'A' + (sum % 26); fname[pos + 1] = 'A' + (sum / 26 % 26); fname[pos + 2] = '\0';