diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-11-29 13:17:31 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-12-14 09:22:40 +0100 |
commit | b6c36746cf4d7234615a50c042561bf21daa51a7 (patch) | |
tree | 907603ccbf4be7eedc9d6d790e0752c37171d613 /beos | |
parent | 476161f6df66100c5d0786092b0320bded84031b (diff) | |
download | perl-b6c36746cf4d7234615a50c042561bf21daa51a7.tar.gz |
Remove the BeOS port.
BeOS was an operating system for personal computers developed by Be Inc,
initially for their BeBox hardware. The OS Haiku was written as an open source
replacement/continuation for BeOS, and its perl port is current and actively
maintained.
The BeOS port has not been updated since 2004.
Diffstat (limited to 'beos')
-rw-r--r-- | beos/beos.c | 67 | ||||
-rw-r--r-- | beos/beosish.h | 38 | ||||
-rw-r--r-- | beos/nm.c | 53 |
3 files changed, 0 insertions, 158 deletions
diff --git a/beos/beos.c b/beos/beos.c deleted file mode 100644 index 5769abcdf7..0000000000 --- a/beos/beos.c +++ /dev/null @@ -1,67 +0,0 @@ -#include "beos/beosish.h" - -#undef waitpid -#undef kill -#undef sigaction - -#include <errno.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <sys/wait.h> - -#include <OS.h> - -/* In BeOS 5.0 the waitpid() seems to misbehave in that the status - * has the upper and lower bytes swapped compared with the usual - * POSIX/UNIX implementations. To undo the surprise effect to the - * rest of Perl we need this wrapper. (The rest of BeOS might be - * surprised because of this, though.) */ - -pid_t beos_waitpid(pid_t process_id, int *status_location, int options) { - pid_t got = waitpid(process_id, status_location, options); - if (status_location) - *status_location = - (*status_location & 0x00FF) << 8 | - (*status_location & 0xFF00) >> 8; - return got; -} - - -/* BeOS kill() doesn't like the combination of the pseudo-signal 0 and - * specifying a process group (i.e. pid < -1 || pid == 0). We work around - * by changing pid to the respective process group leader. That should work - * well enough in most cases. */ - -int beos_kill(pid_t pid, int sig) -{ - if (sig == 0) { - if (pid == 0) { - /* it's our process group */ - pid = getpgrp(); - } else if (pid < -1) { - /* just address the process group leader */ - pid = -pid; - } - } - - return kill(pid, sig); -} - -/* sigaction() should fail, if trying to ignore or install a signal handler - * for a signal that cannot be caught or ignored. The BeOS R5 sigaction() - * doesn't return an error, though. */ -int beos_sigaction(int sig, const struct sigaction *act, - struct sigaction *oact) -{ - int result = sigaction(sig, act, oact); - - if (result == 0 && act && act->sa_handler != SIG_DFL - && act->sa_handler != SIG_ERR && (sig == SIGKILL || sig == SIGSTOP)) { - result = -1; - errno = EINVAL; - } - - return result; -} diff --git a/beos/beosish.h b/beos/beosish.h deleted file mode 100644 index 7aab15f402..0000000000 --- a/beos/beosish.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef PERL_BEOS_BEOSISH_H -#define PERL_BEOS_BEOSISH_H - -#include "../unixish.h" - -#undef waitpid -#define waitpid beos_waitpid - -pid_t beos_waitpid(pid_t process_id, int *status_location, int options); - -/* This seems to be protoless. */ -char *gcvt(double value, int num_digits, char *buffer); - -/* flock support, if available */ -#ifdef HAS_FLOCK - -#include <flock.h> - -#undef close -#define close flock_close - -#undef dup2 -#define dup2 flock_dup2 - -#endif /* HAS_FLOCK */ - - -#undef kill -#define kill beos_kill -int beos_kill(pid_t pid, int sig); - -#undef sigaction -#define sigaction(sig, act, oact) beos_sigaction((sig), (act), (oact)) -int beos_sigaction(int sig, const struct sigaction *act, - struct sigaction *oact); - -#endif - diff --git a/beos/nm.c b/beos/nm.c deleted file mode 100644 index 4f53f743b2..0000000000 --- a/beos/nm.c +++ /dev/null @@ -1,53 +0,0 @@ -/* nm.c - a feeble shared-lib library parser - * Copyright 1997, 1998 Tom Spindler - * This software is covered under perl's Artistic license. - */ - -/* $Id: nm.c,v 1.1 1998/02/16 03:51:26 dogcow Exp $ */ - -#include <be/kernel/image.h> -#include <malloc.h> -#include <string.h> -#include <unistd.h> -#include <stdio.h> -#include <stdlib.h> - -main(int argc, char **argv) { -char *path, *symname; -image_id img; -int32 n = 0; -volatile int32 symnamelen, symtype; -void *symloc; - -if (argc != 2) { printf("more args, bozo\n"); exit(1); } - -path = (void *) malloc((size_t) 2048); -symname = (void *) malloc((size_t) 2048); - -if (!getcwd(path, 2048)) { printf("aiee!\n"); exit(1); } -if (!strcat(path, "/")) {printf("naah.\n"); exit (1); } -/*printf("%s\n",path);*/ - -if ('/' != argv[1][0]) { - if (!strcat(path, argv[1])) { printf("feh1\n"); exit(1); } -} else { - if (!strcpy(path, argv[1])) { printf("gah!\n"); exit(1); } -} -/*printf("%s\n",path);*/ - -img = load_add_on(path); -if (B_ERROR == img) {printf("Couldn't load_add_on() %s.\n", path); exit(2); } - -symnamelen=2047; - -while (B_BAD_INDEX != get_nth_image_symbol(img, n++, symname, &symnamelen, - &symtype, &symloc)) { - printf("%s |%s |GLOB %Lx | \n", symname, - ((B_SYMBOL_TYPE_ANY == symtype) || (B_SYMBOL_TYPE_TEXT == symtype)) ? "FUNC" : "VAR ", symloc); - symnamelen=2047; -} -printf("number of symbols: %d\n", n); -if (B_ERROR == unload_add_on(img)) {printf("err while closing.\n"); exit(3); } -free(path); -return(0); -} |