summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorKen Hirsch <kenhirsch@ftml.net>2006-01-12 08:26:16 -0500
committerNicholas Clark <nick@ccl4.org>2006-01-13 18:10:55 +0000
commitba1af1f8a2de73984e3ae0449178c96c696cf2b7 (patch)
treeebdc52fa238e36d1c8d079ee1cf4ec67d311968f /pp_sys.c
parente603cea99a8eb743384d90e0c072755b08a207a5 (diff)
downloadperl-ba1af1f8a2de73984e3ae0449178c96c696cf2b7.tar.gz
Re: Today's compiling adventure
Message-ID: <43C69F48.7090600@ftml.net> Date: Thu, 12 Jan 2006 13:26:16 -0500 p4raw-id: //depot/perl@26831
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/pp_sys.c b/pp_sys.c
index fa5c59e7c6..9777f695a1 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2381,10 +2381,6 @@ PP(pp_bind)
{
#ifdef HAS_SOCKET
dVAR; dSP;
-#ifdef MPE /* Requires PRIV mode to bind() to ports < 1024 */
- extern void GETPRIVMODE();
- extern void GETUSERMODE();
-#endif
SV * const addrsv = POPs;
/* OK, so on what platform does bind modify addr? */
const char *addr;
@@ -2392,35 +2388,16 @@ PP(pp_bind)
register IO * const io = GvIOn(gv);
STRLEN len;
int bind_ok = 0;
-#ifdef MPE
- int mpeprivmode = 0;
-#endif
if (!io || !IoIFP(io))
goto nuts;
addr = SvPV_const(addrsv, len);
TAINT_PROPER("bind");
-#ifdef MPE /* Deal with MPE bind() peculiarities */
- if (((struct sockaddr *)addr)->sa_family == AF_INET) {
- /* The address *MUST* stupidly be zero. */
- ((struct sockaddr_in *)addr)->sin_addr.s_addr = INADDR_ANY;
- /* PRIV mode is required to bind() to ports < 1024. */
- if (((struct sockaddr_in *)addr)->sin_port < 1024 &&
- ((struct sockaddr_in *)addr)->sin_port > 0) {
- GETPRIVMODE(); /* If this fails, we are aborted by MPE/iX. */
- mpeprivmode = 1;
- }
- }
-#endif /* MPE */
if (PerlSock_bind(PerlIO_fileno(IoIFP(io)),
(struct sockaddr *)addr, len) >= 0)
bind_ok = 1;
-#ifdef MPE /* Switch back to USER mode */
- if (mpeprivmode)
- GETUSERMODE();
-#endif /* MPE */
if (bind_ok)
RETPUSHYES;