From a5f25d7aeb90fd429ad81529bb602f402d5f9724 Mon Sep 17 00:00:00 2001 From: Paul Green Date: Thu, 28 Mar 2002 02:46:00 -0500 Subject: Neuter socketpair on Stratus VOS Message-Id: <200203281246.HAA14426@mailhub1.stratus.com> p4raw-id: //depot/perl@15582 --- vos/vos.c | 21 ++++++++++++++++++--- vos/vosish.h | 3 +++ 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'vos') diff --git a/vos/vos.c b/vos/vos.c index c3566d4a8e..a72614c3f3 100644 --- a/vos/vos.c +++ b/vos/vos.c @@ -1,14 +1,17 @@ /* Beginning of modification history */ /* Written 02-01-02 by Nick Ing-Simmons (nick@ing-simmons.net) */ +/* Modified 02-03-27 by Paul Green (Paul.Green@stratus.com) to + add socketpair() dummy. */ /* End of modification history */ -/* VOS doesn't supply a truncate function, so we build one up - from the available POSIX functions. */ - +#include #include #include #include +/* VOS doesn't supply a truncate function, so we build one up + from the available POSIX functions. */ + int truncate(const char *path, off_t len) { @@ -20,3 +23,15 @@ truncate(const char *path, off_t len) } return code; } + +/* VOS doesn't implement AF_UNIX (AF_LOCAL) style sockets, and + the perl emulation of them hangs on VOS (due to stcp-1257), + so we supply this version that always fails. */ + +int +socketpair (int family, int type, int protocol, int fd[2]) { + fd[0] = 0; + fd[1] = 0; + errno = ENOSYS; + return -1; +} diff --git a/vos/vosish.h b/vos/vosish.h index 5befc6586a..dfddd31fd7 100644 --- a/vos/vosish.h +++ b/vos/vosish.h @@ -9,3 +9,6 @@ extern int ioctl (int fd, int request, ...); /* Specify a prototype for truncate() since we are supplying one. */ extern int truncate (const char *path, off_t len); + +/* Specify a prototype for socketpair() since we supplying one. */ +extern int socketpair (int family, int type, int protocol, int fd[2]); -- cgit v1.2.1