summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-16 19:46:38 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-16 19:46:38 +0000
commit2986a63f7e513cf37f46db9f211b77071260031f (patch)
tree9a6e62602396938ea5a612420f53ebf267e8d941 /ext
parent87b11a197a59fac210fc9265bde0ef1ffe36de89 (diff)
downloadperl-2986a63f7e513cf37f46db9f211b77071260031f.tar.gz
NetWare port from Guruprasad S <SGURUPRASAD@novell.com>.
p4raw-id: //depot/perl@10643
Diffstat (limited to 'ext')
-rw-r--r--ext/Errno/Errno_pm.PL20
-rw-r--r--ext/IO/IO.xs6
-rw-r--r--ext/POSIX/POSIX.xs23
-rw-r--r--ext/Socket/Socket.xs5
4 files changed, 43 insertions, 11 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index 4a11318daf..575e77c63a 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -107,12 +107,16 @@ sub get_files {
open(CPPI,"> errno.c") or
die "Cannot open errno.c";
- print CPPI "#include <errno.h>\n";
+ if ($^O eq 'NetWare') {
+ print CPPI "#include <nwerrno.h>\n";
+ } else {
+ print CPPI "#include <errno.h>\n";
+ }
close(CPPI);
# invoke CPP and read the output
- if ($^O eq 'MSWin32') {
+ if ($^O eq 'MSWin32' || $^O eq 'NetWare') {
open(CPPO,"$Config{cpprun} $Config{cppflags} errno.c |") or
die "Cannot run '$Config{cpprun} $Config{cppflags} errno.c'";
} else {
@@ -122,14 +126,14 @@ sub get_files {
}
my $pat;
- if ($^O eq 'MSWin32' and $Config{cc} =~ /^bcc/i) {
+ if (($^O eq 'MSWin32' || $^O eq 'NetWare') and $Config{cc} =~ /^bcc/i) {
$pat = '^/\*\s+(.+)\s+\d+\s*:\s+\*/';
}
else {
$pat = '^#\s*(?:line)?\s*\d+\s+"([^"]+)"';
}
while(<CPPO>) {
- if ($^O eq 'os2' or $^O eq 'MSWin32') {
+ if ($^O eq 'os2' or $^O eq 'MSWin32' or $^O eq 'NetWare') {
if (/$pat/o) {
my $f = $1;
$f =~ s,\\\\,/,g;
@@ -157,7 +161,11 @@ sub write_errno_pm {
open(CPPI,"> errno.c") or
die "Cannot open errno.c";
- print CPPI "#include <errno.h>\n";
+ if ($^O eq 'NetWare') {
+ print CPPI "#include <nwerrno.h>\n";
+ } else {
+ print CPPI "#include <errno.h>\n";
+ }
foreach $err (keys %err) {
print CPPI '"',$err,'" [[',$err,']]',"\n";
@@ -173,7 +181,7 @@ sub write_errno_pm {
$cpp =~ s/sys\$input//i;
open(CPPO,"$cpp errno.c |") or
die "Cannot exec $Config{cppstdin}";
- } elsif ($^O eq 'MSWin32') {
+ } elsif ($^O eq 'MSWin32' || $^O eq 'NetWare') {
open(CPPO,"$Config{cpprun} $Config{cppflags} errno.c |") or
die "Cannot run '$Config{cpprun} $Config{cppflags} errno.c'";
} else {
diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs
index 8bdc133126..ef91a97792 100644
--- a/ext/IO/IO.xs
+++ b/ext/IO/IO.xs
@@ -430,7 +430,11 @@ sockatmark (sock)
{
int flag = 0;
# ifdef SIOCATMARK
- if (ioctl(fd, SIOCATMARK, &flag) != 0)
+ #ifdef NETWARE
+ if (ioctl(fd, SIOCATMARK, (void*)&flag) != 0)
+ #else
+ if (ioctl(fd, SIOCATMARK, &flag) != 0)
+ #endif
XSRETURN_UNDEF;
# else
not_here("IO::Socket::atmark");
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 80af6d3b01..c2e9852494 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -2,6 +2,15 @@
#define _POSIX_
#endif
+#ifdef NETWARE
+ #define _POSIX_
+ //Ideally this should be somewhere down in the includes
+ //but putting it in other places is giving compiler errors.
+ //Also here I am unable to check for HAS_UNAME since it wouldn't have yet
+ //come into the file at this stage - sgp 18th Oct 2000
+ #include <sys/utsname.h>
+#endif /* NETWARE */
+
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
@@ -65,7 +74,7 @@
#include <fcntl.h>
#ifdef HAS_TZNAME
-# if !defined(WIN32) && !defined(__CYGWIN__)
+# if !defined(WIN32) && !defined(__CYGWIN__) && !defined(NETWARE)
extern char *tzname[];
# endif
#else
@@ -126,7 +135,7 @@ char *tzname[] = { "" , "" };
#if defined (__CYGWIN__)
# define tzname _tzname
#endif
-#if defined (WIN32)
+#if defined (WIN32) || defined (NETWARE)
# undef mkfifo
# define mkfifo(a,b) not_here("mkfifo")
# define ttyname(a) (char*)not_here("ttyname")
@@ -156,6 +165,10 @@ char *tzname[] = { "" , "" };
# define sigdelset(a,b) not_here("sigdelset")
# define sigfillset(a) not_here("sigfillset")
# define sigismember(a,b) not_here("sigismember")
+#ifndef NETWARE
+# define setuid(a) not_here("setuid")
+# define setgid(a) not_here("setgid")
+#endif /* NETWARE */
#else
# ifndef HAS_MKFIFO
@@ -182,7 +195,7 @@ char *tzname[] = { "" , "" };
# ifdef I_UTIME
# include <utime.h>
# endif
-#endif /* WIN32 */
+#endif /* WIN32 || NETWARE */
#endif /* __VMS */
typedef int SysRet;
@@ -269,7 +282,9 @@ unsigned long strtoul (const char *, char **, int);
#define tcsetpgrp(a,b) not_here("tcsetpgrp")
#endif
#ifndef HAS_TIMES
+#ifndef NETWARE
#define times(a) not_here("times")
+#endif /* NETWARE */
#endif
#ifndef HAS_UNAME
#define uname(a) not_here("uname")
@@ -1156,7 +1171,7 @@ sigaction(sig, optaction, oldaction = 0)
SV * optaction
POSIX::SigAction oldaction
CODE:
-#ifdef WIN32
+#if defined(WIN32) || defined(NETWARE)
RETVAL = not_here("sigaction");
#else
# This code is really grody because we're trying to make the signal
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index 671a60fc37..2a37542526 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -39,6 +39,11 @@
# include "sockadapt.h"
#endif
+#ifdef NETWARE
+NETDB_DEFINE_CONTEXT
+NETINET_DEFINE_CONTEXT
+#endif
+
#ifdef I_SYSUIO
# include <sys/uio.h>
#endif