# include <sys/socket.h>
# if defined(USE_SOCKS) && defined(I_SOCKS)
# include <socks.h>
-# endif
+# endif
# ifdef MPE
# define PF_INET AF_INET
# define PF_UNIX AF_UNIX
#ifndef HAS_INET_ATON
-/*
+/*
* Check whether "cp" is a valid ascii representation
* of an Internet address and convert to a binary address.
* Returns 1 if the address is valid, 0 if not.
continue;
}
if (base == 16 && (s=strchr(PL_hexdigit,c))) {
- val = (val << 4) +
+ val = (val << 4) +
((s - PL_hexdigit) & 15);
cp++;
continue;
#define PERL_constant_ISYES 11
static int
-constant_6 (const char *name, IV *iv_return, SV **sv_return) {
+constant_6 (pTHX_ const char *name, IV *iv_return, SV **sv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
AF_802 AF_DLI AF_LAT AF_MAX AF_NBS AF_NIT AF_OSI AF_PUP AF_SNA AF_X25
}
static int
-constant_7 (const char *name, IV *iv_return, SV **sv_return) {
+constant_7 (pTHX_ const char *name, IV *iv_return, SV **sv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
AF_ECMA AF_INET AF_UNIX IOV_MAX MSG_EOF MSG_EOR MSG_FIN MSG_OOB MSG_RST
}
static int
-constant_8 (const char *name, IV *iv_return, SV **sv_return) {
+constant_8 (pTHX_ const char *name, IV *iv_return, SV **sv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
AF_CCITT AF_CHAOS AF_GOSIP MSG_PEEK PF_CCITT PF_CHAOS PF_GOSIP SOCK_RAW
}
static int
-constant_9 (const char *name, IV *iv_return, SV **sv_return) {
+constant_9 (pTHX_ const char *name, IV *iv_return, SV **sv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
AF_DECnet AF_HYLINK AF_OSINET AF_UNSPEC MSG_BCAST MSG_MCAST MSG_PROXY
}
static int
-constant_10 (const char *name, IV *iv_return, SV **sv_return) {
+constant_10 (pTHX_ const char *name, IV *iv_return, SV **sv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
AF_DATAKIT AF_IMPLINK INADDR_ANY MSG_CTRUNC PF_DATAKIT PF_IMPLINK
}
static int
-constant_11 (const char *name, IV *iv_return, SV **sv_return) {
+constant_11 (pTHX_ const char *name, IV *iv_return, SV **sv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
INADDR_NONE IPPROTO_TCP MSG_WAITALL SCM_CONNECT SOCK_STREAM SO_RCVLOWAT
}
static int
-constant_12 (const char *name, IV *iv_return, SV **sv_return) {
+constant_12 (pTHX_ const char *name, IV *iv_return, SV **sv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
AF_APPLETALK MSG_CTLFLAGS MSG_DONTWAIT MSG_ERRQUEUE MSG_NOSIGNAL
}
static int
-constant_13 (const char *name, IV *iv_return, SV **sv_return) {
+constant_13 (pTHX_ const char *name, IV *iv_return, SV **sv_return) {
/* When generated this function returned values for the list of names given
here. However, subsequent manual editing may have added or removed some.
MSG_CTLIGNORE MSG_DONTROUTE MSG_MAXIOVLEN SCM_TIMESTAMP SO_ACCEPTCONN
}
static int
-constant (const char *name, STRLEN len, IV *iv_return, SV **sv_return) {
+constant (pTHX_ const char *name, STRLEN len, IV *iv_return, SV **sv_return) {
/* Initially switch on the length of the name. */
/* When generated this function returned values for the list of names given
in this section of perl code. Rather than manually editing these functions
}
break;
case 6:
- return constant_6 (name, iv_return, sv_return);
+ return constant_6 (aTHX_ name, iv_return, sv_return);
break;
case 7:
- return constant_7 (name, iv_return, sv_return);
+ return constant_7 (aTHX_ name, iv_return, sv_return);
break;
case 8:
- return constant_8 (name, iv_return, sv_return);
+ return constant_8 (aTHX_ name, iv_return, sv_return);
break;
case 9:
- return constant_9 (name, iv_return, sv_return);
+ return constant_9 (aTHX_ name, iv_return, sv_return);
break;
case 10:
- return constant_10 (name, iv_return, sv_return);
+ return constant_10 (aTHX_ name, iv_return, sv_return);
break;
case 11:
- return constant_11 (name, iv_return, sv_return);
+ return constant_11 (aTHX_ name, iv_return, sv_return);
break;
case 12:
- return constant_12 (name, iv_return, sv_return);
+ return constant_12 (aTHX_ name, iv_return, sv_return);
break;
case 13:
- return constant_13 (name, iv_return, sv_return);
+ return constant_13 (aTHX_ name, iv_return, sv_return);
break;
case 14:
/* Names all of length 14. */
PPCODE:
/* Change this to constant(s, len, &iv, &nv);
if you need to return both NVs and IVs */
- type = constant(s, len, &iv, &sv);
+ type = constant(aTHX_ s, len, &iv, &sv);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
switch (type) {
if (pathname[0] != '/' && pathname[0] != '\\')
croak("Relative UNIX domain socket name '%s' unsupported", pathname);
- else if (len < 8
+ else if (len < 8
|| pathname[7] != '/' && pathname[7] != '\\'
|| !strnicmp(pathname + 1, "socket", 6))
off = 7;
if (*s = '/')
*s = '\\';
}
-# else /* !( defined OS2 ) */
+# else /* !( defined OS2 ) */
Copy( pathname, sun_ad.sun_path, len, char );
# endif
+ if (0) not_here("dummy");
ST(0) = sv_2mortal(newSVpvn((char *)&sun_ad, sizeof sun_ad));
#else
ST(0) = (SV *) not_here("pack_sockaddr_un");
"Socket::unpack_sockaddr_in",
addr.sin_family,
AF_INET);
- }
+ }
port = ntohs(addr.sin_port);
ip_address = addr.sin_addr;