;;
aix*)
shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
- shrpldflags="$shrpldflags -b noentry $ldflags $libs $cryptlib"
+ case "$osvers" in
+ 3*)
+ shrpldflags="$shrpldflags -e _nostart $ldflags $libs $cryptlib"
+ ;;
+ *)
+ shrpldflags="$shrpldflags -b noentry $ldflags $libs $cryptlib"
+ ;;
+ esac
aixinstdir=`pwd | sed 's/\/UU$//'`
linklibperl="-L $archlibexp/CORE -L $aixinstdir -lperl"
;;
#include <a.out.h>
#include <ldfcn.h>
+/* If using PerlIO, redefine these macros from <ldfcn.h> */
+#ifdef USE_PERLIO
+#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
;
return -1;
}
+/* 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);
# Create the export list for perl.
# Needed by AIX to do dynamic linking.
#
-# This simple program relys on 'global.sym' being up to date
-# with all of the global symbols that a dynamicly link library
-# might want to access.
+# This simple program relys on 'global.sym' and other *.sym files
+# being up to date with all of the global symbols that a dynamic
+# link library might want to access.
#
# Most symbols have a Perl_ prefix because that's what embed.h sticks
# in front of them. Variations depend on binary compatibility with
;;
esac
+#
+# If we use the PerlIO abstraction layer, add its symbols
+#
+
+if [ $useperlio = "define" ]
+then
+ grep '^[A-Za-z]' perlio.sym >> perl.exp
+fi
+
#
# Extra globals not included above (including a few that might
# not actually be defined, but there's no harm in that).
--- /dev/null
+# Symbols which arise as part of the PerlIO abstraction
+
+PerlIO_stderr
+PerlIO_stderr
+PerlIO_stdin
+PerlIO_stdout
+PerlIO_fast_gets
+PerlIO_has_cntptr
+PerlIO_canset_cnt
+PerlIO_set_cnt
+PerlIO_set_ptrcnt
+PerlIO_get_cnt
+PerlIO_get_bufsiz
+PerlIO_get_ptr
+PerlIO_get_base
+PerlIO_has_base
+PerlIO_puts
+PerlIO_open
+PerlIO_fdopen
+PerlIO_reopen
+PerlIO_close
+PerlIO_eof
+PerlIO_getname
+PerlIO_getc
+PerlIO_error
+PerlIO_clearerr
+PerlIO_flush
+PerlIO_fileno
+PerlIO_setlinebuf
+PerlIO_putc
+PerlIO_ungetc
+PerlIO_read
+PerlIO_write
+PerlIO_vprintf
+PerlIO_tell
+PerlIO_seek
+PerlIO_rewind
+PerlIO_printf
+PerlIO_stdoutf
+PerlIO_tmpfile
+PerlIO_importFILE
+PerlIO_exportFILE
+PerlIO_findFILE
+PerlIO_releaseFILE
+PerlIO_init
+PerlIO_setpos
+PerlIO_getpos
+PerlIO_vsprintf
+PerlIO_sprintf