Filewatcher File Search
FTP Search
  
Directory (beta)
  
Content Search (beta)
   
pkg://perl-5.8.5-9.src.rpm:11782070/perl-5.8.5-incpush.patch  info  downloads

--- perl-5.8.3/perl.c.incpush	2004-02-15 15:07:11.641139634 -0500
+++ perl-5.8.3/perl.c	2004-02-15 15:07:28.611733982 -0500
@@ -44,6 +44,7 @@
 #endif
 
 static I32 read_e_script(pTHX_ int idx, SV *buf_sv, int maxlen);
+STATIC void incpush_oldversion(pTHX_ char *dir);
 
 #ifdef IAMSUID
 #ifndef DOSUID
@@ -4016,6 +4017,7 @@
      * DLL-based path intuition to work correctly */
 #  if !defined(WIN32)
     incpush(SITEARCH_EXP, FALSE, FALSE, TRUE);
+    incpush_oldversion(aTHX_ SITEARCH_EXP);
 #  endif
 #endif
 
@@ -4037,6 +4039,7 @@
      * DLL-based path intuition to work correctly */
 #  if !defined(WIN32)
     incpush(PERL_VENDORARCH_EXP, FALSE, FALSE, TRUE);
+    incpush_oldversion(aTHX_ PERL_VENDORARCH_EXP);
 #  endif
 #endif
 
@@ -4078,6 +4081,35 @@
 #  define PERLLIB_MANGLE(s,n) (s)
 #endif
 
+#define VERSION_DIRECTORY_STRING "/5.8.5"
+STATIC void
+incpush_oldversion(pTHX_ char *dir)
+{
+#ifdef PERL_INC_VERSION_LIST
+  const char *incverlist[] = { PERL_INC_VERSION_LIST };
+  const char **incver;
+  const char *verdir;
+
+  verdir = strstr(dir, VERSION_DIRECTORY_STRING);
+  if (!verdir)
+    return;
+
+  for (incver = incverlist; *incver; incver++) {
+    char *new_dir = malloc(strlen(dir) + strlen(*incver) + 2);
+    char *p = new_dir;
+
+    strcpy(new_dir, dir);
+    p += verdir - dir + 1; /* advance to char following '/' in VERSION_DIRECTORY_STRING */
+    memcpy(p, *incver, strlen(*incver)); /* copy incver there instead */
+    p += strlen(*incver);	/* advance past version we just copied */
+    strcpy(p, verdir + strlen(VERSION_DIRECTORY_STRING)); /* and copy the rest of the original dir */
+
+    incpush(new_dir, FALSE, FALSE, FALSE);
+    free(new_dir);
+  }
+#endif
+}
+
 STATIC void
 S_incpush(pTHX_ char *p, int addsubdirs, int addoldvers, int usesep)
 {
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2008 Oliver Maruhn