From: Jarkko Hietaniemi Date: Tue, 2 Feb 1999 10:38:08 +0000 (+0000) Subject: BeOS update (Mirror maint-5.005 change #2727). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4619340914cc8b5438e9411eca00b9f6a4805995;p=p5sagit%2Fp5-mst-13.2.git BeOS update (Mirror maint-5.005 change #2727). p4raw-link: @2727 on //depot/maint-5.005/perl: 4a34ea11e0df7a07fe7fad105c20b8547c401da9 p4raw-id: //depot/cfgperl@2756 --- diff --git a/Configure b/Configure index 2995765..67ed607 100755 --- a/Configure +++ b/Configure @@ -20,8 +20,8 @@ # $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$$ <&4 @@ -1654,7 +1654,7 @@ Much effort has been expended to ensure that this shell script will run on any 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: @@ -2017,7 +2017,7 @@ EOM (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 @@ -5169,6 +5169,7 @@ use no flags, say "none". EOM case "$lddlflags" in '') case "$osname" in + beos) dflt='-nostart' ;; hpux) dflt='-b' ;; linux|irix*) dflt='-shared' ;; next) dflt='none' ;; @@ -5249,7 +5250,7 @@ $undef) ;; *) 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.' ;; @@ -5294,6 +5295,7 @@ EOM 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 @@ -5380,7 +5382,7 @@ case "$shrpdir" in *) $cat >&4 < +#include +#include +#include + +#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. diff --git a/hints/beos.sh b/hints/beos.sh index ab75276..8d76bc5 100644 --- a/hints/beos.sh +++ b/hints/beos.sh @@ -1,11 +1,12 @@ # 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' @@ -37,9 +38,16 @@ d_syserrlst='undef' # 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" diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 43d37ff..1197cd6 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -3539,6 +3539,7 @@ and Win32 do. sub perl_archive { + return '$(PERL_INC)' . "/$Config{libperl}" if $^O eq "beos"; return ""; }