==> perl-5.6.1 <== flagged by || < || 
==> perl-5.6.1.NEW <== flagged by || > || 
diff -r -c -s -w -b perl-5.6.1/ext/DynaLoader/dl_aix.xs perl-5.6.1.NEW/ext/DynaLoader/dl_aix.xs
*** perl-5.6.1/ext/DynaLoader/dl_aix.xs	Fri Mar 30 14:14:39 2001
--- perl-5.6.1.NEW/ext/DynaLoader/dl_aix.xs	Fri May  3 17:16:02 2002
***************
*** 41,46 ****
--- 41,47 ----
  #undef FREAD
  #undef FWRITE
  #include <ldfcn.h>
+ #include <dlfcn.h>
  
  #ifdef USE_64_BIT_ALL
  #   define AIX_SCNHDR SCNHDR_64
***************
*** 195,304 ****
      return str;
  }
    
- /* ARGSUSED */
- void *dlopen(char *path, int mode)
- {
- 	dTHX;
- 	register ModulePtr mp;
- 	static void *mainModule;		/* XXX threaded */
  
  	/*
- 	 * Upon the first call register a terminate handler that will
- 	 * close all libraries.
- 	 */
- 	if (mainModule == NULL) {
- 		if ((mainModule = findMain()) == NULL)
- 			return NULL;
- 	}
- 	/*
- 	 * Scan the list of modules if have the module already loaded.
- 	 */
- 	for (mp = modList; mp; mp = mp->next)
- 		if (strcmp(mp->name, path) == 0) {
- 			mp->refCnt++;
- 			return mp;
- 		}
- 	Newz(1000,mp,1,Module);
- 	if (mp == NULL) {
- 		errvalid++;
- 		strcpy(errbuf, "Newz: ");
- 		strerrorcat(errbuf, errno);
- 		return NULL;
- 	}
- 	
- 	if ((mp->name = savepv(path)) == NULL) {
- 		errvalid++;
- 		strcpy(errbuf, "savepv: ");
- 		strerrorcat(errbuf, errno);
- 		safefree(mp);
- 		return NULL;
- 	}
- 
- 	/*
- 	 * load should be declared load(const char *...). Thus we
- 	 * cast the path to a normal char *. Ugly.
- 	 */
- 	if ((mp->entry = (void *)LOAD((char *)path,
- #ifdef L_LIBPATH_EXEC
- 				      L_LIBPATH_EXEC |
- #endif
- 				      L_NOAUTODEFER,
- 				      NULL)) == NULL) {
- 	        int saverrno = errno;
- 		
- 		safefree(mp->name);
- 		safefree(mp);
- 		errvalid++;
- 		strcpy(errbuf, "dlopen: ");
- 		strcat(errbuf, path);
- 		strcat(errbuf, ": ");
- 		/*
- 		 * If AIX says the file is not executable, the error
- 		 * can be further described by querying the loader about
- 		 * the last error.
- 		 */
- 		if (saverrno == ENOEXEC) {
- 			char *moreinfo[BUFSIZ/sizeof(char *)];
- 			if (loadquery(L_GETMESSAGES, moreinfo, sizeof(moreinfo)) == -1)
- 				strerrorcpy(errbuf, saverrno);
- 			else {
- 				char **p;
- 				for (p = moreinfo; *p; p++)
- 					caterr(*p);
- 			}
- 		} else
- 			strerrorcat(errbuf, saverrno);
- 		return NULL;
- 	}
- 	mp->refCnt = 1;
- 	mp->next = modList;
- 	modList = mp;
- 	/*
- 	 * Assume anonymous exports come from the module this dlopen
- 	 * is linked into, that holds true as long as dlopen and all
- 	 * of the perl core are in the same shared object. Also bind
- 	 * against the main part, in the case a perl is not the main
- 	 * part, e.g mod_perl as DSO in Apache so perl modules can
- 	 * also reference Apache symbols.
- 	 */
- 	if (loadbind(0, (void *)dlopen, mp->entry) == -1 ||
- 	    loadbind(0, mainModule, mp->entry)) {
- 	        int saverrno = errno;
- 
- 		dlclose(mp);
- 		errvalid++;
- 		strcpy(errbuf, "loadbind: ");
- 		strerrorcat(errbuf, saverrno);
- 		return NULL;
- 	}
- 	if (readExports(mp) == -1) {
- 		dlclose(mp);
- 		return NULL;
- 	}
- 	return mp;
- }
- 
- /*
   * Attempt to decipher an AIX loader error message and append it
   * to our static error message buffer.
   */
--- 196,203 ----
***************
*** 337,361 ****
  	}
  }
  
- void *dlsym(void *handle, const char *symbol)
- {
- 	register ModulePtr mp = (ModulePtr)handle;
- 	register ExportPtr ep;
- 	register int i;
  
- 	/*
- 	 * Could speed up search, but I assume that one assigns
- 	 * the result to function pointers anyways.
- 	 */
- 	for (ep = mp->exports, i = mp->nExports; i; i--, ep++)
- 		if (strcmp(ep->name, symbol) == 0)
- 			return ep->addr;
- 	errvalid++;
- 	strcpy(errbuf, "dlsym: undefined symbol ");
- 	strcat(errbuf, symbol);
- 	return NULL;
- }
- 
  char *dlerror(void)
  {
  	if (errvalid) {
--- 236,242 ----
***************
*** 365,405 ****
  	return NULL;
  }
  
- int dlclose(void *handle)
- {
- 	register ModulePtr mp = (ModulePtr)handle;
- 	int result;
- 	register ModulePtr mp1;
  
- 	if (--mp->refCnt > 0)
- 		return 0;
- 	result = UNLOAD(mp->entry);
- 	if (result == -1) {
- 		errvalid++;
- 		strerrorcpy(errbuf, errno);
- 	}
- 	if (mp->exports) {
- 		register ExportPtr ep;
- 		register int i;
- 		for (ep = mp->exports, i = mp->nExports; i; i--, ep++)
- 			if (ep->name)
- 				safefree(ep->name);
- 		safefree(mp->exports);
- 	}
- 	if (mp == modList)
- 		modList = mp->next;
- 	else {
- 		for (mp1 = modList; mp1; mp1 = mp1->next)
- 			if (mp1->next == mp) {
- 				mp1->next = mp->next;
- 				break;
- 			}
- 	}
- 	safefree(mp->name);
- 	safefree(mp);
- 	return result;
- }
- 
  /* Added by Wayne Scott 
   * This is needed because the ldopen system call calls
   * calloc to allocated a block of date.  The ldclose call calls free.
--- 246,252 ----
***************
*** 677,683 ****
  	DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_load_file(%s,%x):\n", filename,flags));
  	if (flags & 0x01)
  	    Perl_warn(aTHX_ "Can't make loaded symbols global on this platform while loading %s",filename);
! 	RETVAL = dlopen(filename, 1) ;
  	DLDEBUG(2,PerlIO_printf(Perl_debug_log, " libref=%x\n", RETVAL));
  	ST(0) = sv_newmortal() ;
  	if (RETVAL == NULL)
--- 524,533 ----
  	DLDEBUG(1,PerlIO_printf(Perl_debug_log, "dl_load_file(%s,%x):\n", filename,flags));
  	if (flags & 0x01)
  	    Perl_warn(aTHX_ "Can't make loaded symbols global on this platform while loading %s",filename);
! 		/*
! 	RETVAL = dlopen(filename, 0x00010002) ;
! 		*/
! 	RETVAL = dlopen(filename, RTLD_NOW | RTLD_GLOBAL) ;
  	DLDEBUG(2,PerlIO_printf(Perl_debug_log, " libref=%x\n", RETVAL));
  	ST(0) = sv_newmortal() ;
  	if (RETVAL == NULL)
diff -r -c -s -w -b perl-5.6.1/ext/IPC/SysV/SysV.xs perl-5.6.1.NEW/ext/IPC/SysV/SysV.xs
*** perl-5.6.1/ext/IPC/SysV/SysV.xs	Thu Apr  5 23:38:46 2001
--- perl-5.6.1.NEW/ext/IPC/SysV/SysV.xs	Mon May  6 23:37:30 2002
***************
*** 203,209 ****
          key_t k = ftok(path, id);
          ST(0) = k == (key_t) -1 ? &PL_sv_undef : sv_2mortal(newSViv(k));
  #else
!         DIE(aTHX_ PL_no_func, "ftok");
  #endif
  
  void
--- 203,209 ----
          key_t k = ftok(path, id);
          ST(0) = k == (key_t) -1 ? &PL_sv_undef : sv_2mortal(newSViv(k));
  #else
!         die(aTHX_ PL_no_func, "ftok");
  #endif
  
  void
