# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Fri Jan 22 10:52:50 EET 1999 [metaconfig 3.0 PL70]
-# (with additional metaconfig patches by jhi@iki.fi)
+# Generated on Tue Feb 2 12:38:43 EET 1999 [metaconfig 3.0 PL70]
+# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
$me: Fatal Error: I can't find a Bourne Shell anywhere.
Usually it's in /bin/sh. How did you even get this far?
-Please contact me (Jarkko Hietaniemi) at jhi@iki.fi and
+Please contact me (Perl Maintainers) at perlbug@perl.com and
we'll try to straighten this all out.
EOM
exit 1
You have the option of continuing the configuration process, despite the
distinct possibility that your kit is damaged, by typing 'y'es. If you
do, don't blame me if something goes wrong. I advise you to type 'n'o
-and contact the author (jhi@iki.fi).
+and contact the author (perlbug@perl.com).
EOM
echo $n "Continue? [n] $c" >&4
Unix system. If despite that it blows up on yours, your best bet is to edit
Configure and run it again. If you can't run Configure for some reason,
you'll have to generate a config.sh file by hand. Whatever problems you
-have, let me (jhi@iki.fi) know how I blew it.
+have, let me (perlbug@perl.com) know how I blew it.
This installation script affects things in two ways:
(cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
dflt=''
: Half the following guesses are probably wrong... If you have better
- : tests or hints, please send them to jhi@iki.fi
+ : tests or hints, please send them to perlbug@perl.com
: The metaconfig authors would also appreciate a copy...
$test -f /irix && osname=irix
$test -f /xenix && osname=sco_xenix
EOM
case "$lddlflags" in
'') case "$osname" in
+ beos) dflt='-nostart' ;;
hpux) dflt='-b' ;;
linux|irix*) dflt='-shared' ;;
next) dflt='none' ;;
;;
*) case "$useshrplib" in
'') case "$osname" in
- svr4*|dgux|dynixptx|esix|powerux)
+ svr4*|dgux|dynixptx|esix|powerux|beos)
dflt=y
also='Building a shared libperl is required for dynamic loading to work on your system.'
;;
case "${osname}${osvers}" in
next4*) xxx='DYLD_LIBRARY_PATH' ;;
os2*) xxx='' ;; # Nothing special needed.
+ beos*) xxx='' ;;
*) xxx='LD_LIBRARY_PATH' ;;
esac
if test X"$xxx" != "X"; then
*) $cat >&4 <<EOM
WARNING: Use of the shrpdir variable for the installation location of
the shared $libperl is not supported. It was never documented and
-will not work in this version. Let me (jhi@iki.fi)
+will not work in this version. Let me (perlbug@perl.com)
know of any problems this may cause.
EOM
next)
# next doesn't like the default...
;;
+ beos)
+ # beos doesn't like the default, either.
+ ;;
*)
tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
;;
ext/DynaLoader/Makefile.PL Dynamic Loader makefile writer
ext/DynaLoader/README Dynamic Loader notes and intro
ext/DynaLoader/dl_aix.xs AIX implementation
+ext/DynaLoader/dl_beos.xs BeOS implementation
ext/DynaLoader/dl_cygwin32.xs Cygwin32 implementation
ext/DynaLoader/dl_dld.xs GNU dld style implementation
ext/DynaLoader/dl_dlopen.xs BSD/SunOS4&5 dlopen() style implementation
hpux10*|hpux11*)
linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl,+b$archlibexp/CORE -lperl"
;;
+ beos*) ldlibpth="LIBRARY_PATH=`pwd`:$LIBRARY_PATH"
+ ;;
esac
;;
*) pldlflags=''
-$Id: README.beos,v 1.2 1998/05/02 01:55:04 dogcow Exp dogcow $
-
Notes on building perl under BeOS:
GENERAL ISSUES
--------------
-perl will almost compile straight out of the box with ./Configure -d, but
-there are a few gotchas:
-
-Currently, you have to edit config.sh and remove SDBM_File from the
-dynamic_ext= and extensions= lines. SDBM_File does not build properly
-at this time. You need to run ./Configure -S after editing config.sh.
-
-In addition, with mwcc, after doing `make depend`, you need to edit
-makefile and x2p/makefile and remove the lines that mention 'Bletch:'.
-This is not necessary if you're using gnu cpp.
+how to compile perl:
-in short:
-./Configure -d
-remove SDBM_File from config.sh
-./Configure -S
-make depend
-remove Bletch: from makefile and x2p/makefile
-make
+To compile perl under BeOS R4 x86:
-Other than that, perl should build without problems. There are some
-technical comments in hints/beos.sh.
-
-OS RELEASE-SPECIFIC NOTES
--------------------------
+`./Configure -d` and hit ^C when it asks you if you want to make changes
+to config.sh;
-PR1/PPC:
-See R3/X86. Same bug, different form.
+edit config.sh and do the following:
+change d_socket='define' to ='undef';
+remove SDBM, Errno, and Socket from dynamic_ext= and nonxs_ext=;
-PR2/PPC:
-Signals are somewhat unreliable, but they can work. Use caution.
-The POSIX module is still somewhat buggy.
+add '#define bool short' to x2p/a2p.h;
-R3/X86:
-Under R3 x86, there are some serious problems with the math routines
-such that numbers are incorrectly printed. This causes problems with
-modules that encode their version numbers - in particular, IO.pm will
-probably not work properly. This should be fixed under R3.1.
+../Configure -S; make; make install
-The problem has manifested itself if you see something similar to the
-following during the compile:
+cd ~/config/lib; ln -s 5.00502/BeOS-BePC/CORE/libperl.so .
+(substitute 5.00502 with the appropriate filename)
-cc -c -I/usr/local/include -O -DVERSION=\"1.1504\" -DXS_VERSION=\"1.1499999999\" -fpic -I../.. IO.c
-(lots of 9's are the indication of the problem.)
-
-In the meantime, you can use the following workaround:
-
-make perl
-cd ext/IO
-cc -c -I/usr/local/include -O -DVERSION=\"1.1504\" -DXS_VERSION=\"1.15\" -fpic -I../.. IO.c
-cd ..
-make
-
-(Substitute the correct numbers if IO has been updated.)
+OS RELEASE-SPECIFIC NOTES
+-------------------------
+R4 x86 - dynamic loading finally works! Yay! This means you can compile
+your own modules into perl. However, Sockets and Errno still don't work.
+(Hopefully, sockets will at least work by R5, if not sooner.)
-R3/PPC-
-There's math problems, but of a different kind. In particular,
-perl -e 'print (240000 - (3e4<<3))' gives a non-zero answer.
-I'm looking into this. There is no workaround as yet. Hopefully,
-this will be fixed in R3.1.
+R4 PPC - I have not tested this. I rather severely doubt that dynamic
+loading will work. (My BeBox is in pieces right now, following a nasty
+disk crash.) You may have to disable dynamic loading to get the thing
+to compile at all. (use `./Configure` without -d, and say 'no' to
+'Build a shared libperl.so'.)
CONTACT INFORMATION
-------------------
If you have comments, problem reports, or even patches or bugfixes (gasp!)
please email me.
-1 May 1998
+28 Jan 1999
Tom Spindler
-dogcow@merit.edu
+dogcow@isi.net
--- /dev/null
+/*
+ * dl_beos.xs, by Tom Spindler
+ * based on dl_dlopen.xs, by Paul Marquess
+ * $Id:$
+ */
+
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+#include <be/kernel/image.h>
+#include <OS.h>
+#include <stdlib.h>
+#include <limits.h>
+
+#define dlerror() strerror(errno)
+
+#include "dlutils.c" /* SaveError() etc */
+
+static void
+dl_private_init()
+{
+ (void)dl_generic_private_init();
+}
+
+MODULE = DynaLoader PACKAGE = DynaLoader
+
+BOOT:
+ (void)dl_private_init();
+
+
+void *
+dl_load_file(filename, flags=0)
+ char * filename
+ int flags
+ CODE:
+{ image_id bogo;
+ char *path;
+ path = malloc(PATH_MAX);
+ if (*filename != '/') {
+ getcwd(path, PATH_MAX);
+ strcat(path, "/");
+ strcat(path, filename);
+ } else {
+ strcpy(path, filename);
+ }
+
+ DLDEBUG(1,PerlIO_printf(PerlIO_stderr(), "dl_load_file(%s,%x):\n", path, flags));
+ bogo = load_add_on(path);
+ DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), " libref=%lx\n", (unsigned long) RETVAL));
+ ST(0) = sv_newmortal() ;
+ if (bogo < 0) {
+ SaveError("%s", strerror(bogo));
+ fprintf(stderr, "load_add_on(%s) : %d (%s)\n", path, bogo, strerror(bogo));
+ } else {
+ RETVAL = (void *) bogo;
+ sv_setiv( ST(0), (IV)RETVAL);
+ }
+ free(path);
+}
+
+void *
+dl_find_symbol(libhandle, symbolname)
+ void * libhandle
+ char * symbolname
+ CODE:
+ status_t retcode;
+ void *adr = 0;
+#ifdef DLSYM_NEEDS_UNDERSCORE
+ symbolname = form("_%s", symbolname);
+#endif
+ RETVAL = NULL;
+ DLDEBUG(2, PerlIO_printf(PerlIO_stderr(),
+ "dl_find_symbol(handle=%lx, symbol=%s)\n",
+ (unsigned long) libhandle, symbolname));
+ retcode = get_image_symbol((image_id) libhandle, symbolname,
+ B_SYMBOL_TYPE_TEXT, (void **) &adr);
+ RETVAL = adr;
+ DLDEBUG(2, PerlIO_printf(PerlIO_stderr(),
+ " symbolref = %lx\n", (unsigned long) RETVAL));
+ ST(0) = sv_newmortal() ;
+ if (RETVAL == NULL) {
+ SaveError("%s", strerror(retcode)) ;
+ fprintf(stderr, "retcode = %p (%s)\n", retcode, strerror(retcode));
+ } else
+ sv_setiv( ST(0), (IV)RETVAL);
+
+
+void
+dl_undef_symbols()
+ PPCODE:
+
+
+
+# These functions should not need changing on any platform:
+
+void
+dl_install_xsub(perl_name, symref, filename="$Package")
+ char * perl_name
+ void * symref
+ char * filename
+ CODE:
+ DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), "dl_install_xsub(name=%s, symref=%lx)\n",
+ perl_name, (unsigned long) symref));
+ ST(0)=sv_2mortal(newRV((SV*)newXS(perl_name, (void(*)_((CV *)))symref, filename)));
+
+
+char *
+dl_error()
+ CODE:
+ RETVAL = LastError ;
+ OUTPUT:
+ RETVAL
+
+# end.
# BeOS hints file
# $Id: beos.sh,v 1.1 1998/02/16 03:51:45 dogcow Exp $
-if [ ! -f beos/nm ]; then mwcc -w all -o beos/nm beos/nm.c; fi
+if [ ! -f beos/nm ]; then mwcc -w all -o beos/nm beos/nm.c 2>/dev/null; fi
+# If this fails, that's all right - it's only for PPC.
prefix="/boot/home/config"
-cpp="mwcc -e"
+#cpp="mwcc -e"
libpth='/boot/beos/system/lib /boot/home/config/lib'
usrinc='/boot/develop/headers/posix'
# the array syserrlst[] is useless for the most part.
# large negative numbers really kind of suck in arrays.
-#d_socket='undef'
+d_socket='undef'
+d_gethbyaddr='undef'
+d_gethbyname='undef'
+d_getsbyname='undef'
+
+ld='gcc'
+
# Sockets really don't work with the current version of perl and the
# current BeOS sockets; I suspect that a new module a la GSAR's WIN32 port
# will be required.
+# Of course, this may also change with R5.
export PATH="$PATH:$PWD/beos"
sub perl_archive
{
+ return '$(PERL_INC)' . "/$Config{libperl}" if $^O eq "beos";
return "";
}