* on statup... It can probably be trimmed more.
*/
+#define PERLIO_NOT_STDIO 0
+
/*
* @(#)dlfcn.c 1.5 revision of 93/02/14 20:14:17
* This is an unpublished work copyright (c) 1992 Helios Software GmbH
/* Older AIX C compilers cannot deal with C++ double-slash comments in
the ibmcxx and/or xlC includes. Since we only need a single file,
be more fine-grained about what's included <hirschs@btv.ibm.com> */
+
#ifdef USE_libC /* The define comes, when it comes, from hints/aix.pl. */
# define LOAD loadAndInit
# define UNLOAD terminateAndUnload
-# if defined(USE_xlC_load_h)
-# include "/usr/lpp/xlC/include/load.h"
+# if defined(USE_vacpp_load_h)
+# include "/usr/vacpp/include/load.h"
# elif defined(USE_ibmcxx_load_h)
# include "/usr/ibmcxx/include/load.h"
+# elif defined(USE_xlC_load_h)
+# include "/usr/lpp/xlC/include/load.h"
+# elif defined(USE_load_h)
+# include "/usr/include/load.h"
# endif
#else
# define LOAD load
# define FREAD(p,s,n,ldptr) fread(p,s,n,IOPTR(ldptr))
#endif
-/* If using PerlIO, redefine these macros from <ldfcn.h> */
-#ifdef USE_PERLIO
-#undef FSEEK
-#undef FREAD
-#define FSEEK(ldptr,o,p) PerlIO_seek(IOPTR(ldptr),(p==BEGINNING)?(OFFSET(ldptr)+o):o,p)
-#define FREAD(p,s,n,ldptr) PerlIO_read(IOPTR(ldptr),p,s*n)
-#endif
-
/*
* We simulate dlopen() et al. through a call to load. Because AIX has
* no call to find an exported symbol we read the loader section of the
p++;
switch(atoi(s)) {
case L_ERROR_TOOMANY:
- strcat(errbuf, "to many errors");
+ strcat(errbuf, "too many errors");
break;
case L_ERROR_NOLIB:
strcat(errbuf, "can't load library");
}
/* This first case is a hack, since it assumes that the 3rd parameter to
FREAD is 1. See the redefinition of FREAD above to see how this works. */
-#ifdef USE_PERLIO
- if (FREAD(ldbuf, sh.s_size, 1, ldp) != sh.s_size) {
-#else
if (FREAD(ldbuf, sh.s_size, 1, ldp) != 1) {
-#endif
errvalid++;
strcpy(errbuf, "readExports: cannot read loader section");
safefree(ldbuf);