require '_h2ph_pre.ph';

unless(defined(&_LINUX_SOCKET_H)) {
    eval 'sub _LINUX_SOCKET_H () {1;}' unless defined(&_LINUX_SOCKET_H);
    if(defined( &__KERNEL__) || !defined( &__GLIBC__) || ((defined(&__GLIBC__) ? &__GLIBC__ : 0) < 2)) {
	require 'asm/socket.ph';
	require 'linux/sockios.ph';
	require 'linux/uio.ph';
	require 'linux/types.ph';
	eval 'sub __CMSG_NXTHDR {
	    local($ctl, $len, $cmsg) = @_;
    	    eval q( &__cmsg_nxthdr(($ctl),($len),($cmsg)));
	}' unless defined(&__CMSG_NXTHDR);
	eval 'sub CMSG_NXTHDR {
	    local($mhdr, $cmsg) = @_;
    	    eval q( &cmsg_nxthdr(($mhdr), ($cmsg)));
	}' unless defined(&CMSG_NXTHDR);
	eval 'sub CMSG_ALIGN {
	    local($len) = @_;
    	    eval q(( (($len)+$sizeof{\'long\'}-1) & ~($sizeof{\'long\'}-1) ));
	}' unless defined(&CMSG_ALIGN);
	eval 'sub CMSG_DATA {
	    local($cmsg) = @_;
    	    eval q(((($cmsg) +  &CMSG_ALIGN($sizeof{\'struct cmsghdr\'}))));
	}' unless defined(&CMSG_DATA);
	eval 'sub CMSG_SPACE {
	    local($len) = @_;
    	    eval q(( &CMSG_ALIGN($sizeof{\'struct cmsghdr\'}) +  &CMSG_ALIGN($len)));
	}' unless defined(&CMSG_SPACE);
	eval 'sub CMSG_LEN {
	    local($len) = @_;
    	    eval q(( &CMSG_ALIGN($sizeof{\'struct cmsghdr\'}) + ($len)));
	}' unless defined(&CMSG_LEN);
	eval 'sub __CMSG_FIRSTHDR {
	    local($ctl,$len) = @_;
    	    eval q(( >=  &sizeof ? :  &NULL));
	}' unless defined(&__CMSG_FIRSTHDR);
	eval 'sub CMSG_FIRSTHDR {
	    local($msg) = @_;
    	    eval q( &__CMSG_FIRSTHDR(($msg)-> &msg_control, ($msg)-> &msg_controllen));
	}' unless defined(&CMSG_FIRSTHDR);
	if(defined( &__GNUC__) ) {
	    eval 'sub __KINLINE () { &static  &__inline__;}' unless defined(&__KINLINE);
	}
 elsif(defined( &__cplusplus)) {
	    eval 'sub __KINLINE () { &static  &inline;}' unless defined(&__KINLINE);
	}
	eval 'sub SCM_RIGHTS () {0x1;}' unless defined(&SCM_RIGHTS);
	eval 'sub SCM_CREDENTIALS () {0x2;}' unless defined(&SCM_CREDENTIALS);
	eval 'sub SCM_CONNECT () {0x3;}' unless defined(&SCM_CONNECT);
	eval 'sub AF_UNSPEC () {0;}' unless defined(&AF_UNSPEC);
	eval 'sub AF_UNIX () {1;}' unless defined(&AF_UNIX);
	eval 'sub AF_LOCAL () {1;}' unless defined(&AF_LOCAL);
	eval 'sub AF_INET () {2;}' unless defined(&AF_INET);
	eval 'sub AF_AX25 () {3;}' unless defined(&AF_AX25);
	eval 'sub AF_IPX () {4;}' unless defined(&AF_IPX);
	eval 'sub AF_APPLETALK () {5;}' unless defined(&AF_APPLETALK);
	eval 'sub AF_NETROM () {6;}' unless defined(&AF_NETROM);
	eval 'sub AF_BRIDGE () {7;}' unless defined(&AF_BRIDGE);
	eval 'sub AF_ATMPVC () {8;}' unless defined(&AF_ATMPVC);
	eval 'sub AF_X25 () {9;}' unless defined(&AF_X25);
	eval 'sub AF_INET6 () {10;}' unless defined(&AF_INET6);
	eval 'sub AF_ROSE () {11;}' unless defined(&AF_ROSE);
	eval 'sub AF_DECnet () {12;}' unless defined(&AF_DECnet);
	eval 'sub AF_NETBEUI () {13;}' unless defined(&AF_NETBEUI);
	eval 'sub AF_SECURITY () {14;}' unless defined(&AF_SECURITY);
	eval 'sub AF_KEY () {15;}' unless defined(&AF_KEY);
	eval 'sub AF_NETLINK () {16;}' unless defined(&AF_NETLINK);
	eval 'sub AF_ROUTE () { &AF_NETLINK;}' unless defined(&AF_ROUTE);
	eval 'sub AF_PACKET () {17;}' unless defined(&AF_PACKET);
	eval 'sub AF_ASH () {18;}' unless defined(&AF_ASH);
	eval 'sub AF_ECONET () {19;}' unless defined(&AF_ECONET);
	eval 'sub AF_ATMSVC () {20;}' unless defined(&AF_ATMSVC);
	eval 'sub AF_SNA () {22;}' unless defined(&AF_SNA);
	eval 'sub AF_IRDA () {23;}' unless defined(&AF_IRDA);
	eval 'sub AF_PPPOX () {24;}' unless defined(&AF_PPPOX);
	eval 'sub AF_WANPIPE () {25;}' unless defined(&AF_WANPIPE);
	eval 'sub AF_BLUETOOTH () {31;}' unless defined(&AF_BLUETOOTH);
	eval 'sub AF_MAX () {32;}' unless defined(&AF_MAX);
	eval 'sub PF_UNSPEC () { &AF_UNSPEC;}' unless defined(&PF_UNSPEC);
	eval 'sub PF_UNIX () { &AF_UNIX;}' unless defined(&PF_UNIX);
	eval 'sub PF_LOCAL () { &AF_LOCAL;}' unless defined(&PF_LOCAL);
	eval 'sub PF_INET () { &AF_INET;}' unless defined(&PF_INET);
	eval 'sub PF_AX25 () { &AF_AX25;}' unless defined(&PF_AX25);
	eval 'sub PF_IPX () { &AF_IPX;}' unless defined(&PF_IPX);
	eval 'sub PF_APPLETALK () { &AF_APPLETALK;}' unless defined(&PF_APPLETALK);
	eval 'sub PF_NETROM () { &AF_NETROM;}' unless defined(&PF_NETROM);
	eval 'sub PF_BRIDGE () { &AF_BRIDGE;}' unless defined(&PF_BRIDGE);
	eval 'sub PF_ATMPVC () { &AF_ATMPVC;}' unless defined(&PF_ATMPVC);
	eval 'sub PF_X25 () { &AF_X25;}' unless defined(&PF_X25);
	eval 'sub PF_INET6 () { &AF_INET6;}' unless defined(&PF_INET6);
	eval 'sub PF_ROSE () { &AF_ROSE;}' unless defined(&PF_ROSE);
	eval 'sub PF_DECnet () { &AF_DECnet;}' unless defined(&PF_DECnet);
	eval 'sub PF_NETBEUI () { &AF_NETBEUI;}' unless defined(&PF_NETBEUI);
	eval 'sub PF_SECURITY () { &AF_SECURITY;}' unless defined(&PF_SECURITY);
	eval 'sub PF_KEY () { &AF_KEY;}' unless defined(&PF_KEY);
	eval 'sub PF_NETLINK () { &AF_NETLINK;}' unless defined(&PF_NETLINK);
	eval 'sub PF_ROUTE () { &AF_ROUTE;}' unless defined(&PF_ROUTE);
	eval 'sub PF_PACKET () { &AF_PACKET;}' unless defined(&PF_PACKET);
	eval 'sub PF_ASH () { &AF_ASH;}' unless defined(&PF_ASH);
	eval 'sub PF_ECONET () { &AF_ECONET;}' unless defined(&PF_ECONET);
	eval 'sub PF_ATMSVC () { &AF_ATMSVC;}' unless defined(&PF_ATMSVC);
	eval 'sub PF_SNA () { &AF_SNA;}' unless defined(&PF_SNA);
	eval 'sub PF_IRDA () { &AF_IRDA;}' unless defined(&PF_IRDA);
	eval 'sub PF_PPPOX () { &AF_PPPOX;}' unless defined(&PF_PPPOX);
	eval 'sub PF_WANPIPE () { &AF_WANPIPE;}' unless defined(&PF_WANPIPE);
	eval 'sub PF_BLUETOOTH () { &AF_BLUETOOTH;}' unless defined(&PF_BLUETOOTH);
	eval 'sub PF_MAX () { &AF_MAX;}' unless defined(&PF_MAX);
	eval 'sub SOMAXCONN () {128;}' unless defined(&SOMAXCONN);
	eval 'sub MSG_OOB () {1;}' unless defined(&MSG_OOB);
	eval 'sub MSG_PEEK () {2;}' unless defined(&MSG_PEEK);
	eval 'sub MSG_DONTROUTE () {4;}' unless defined(&MSG_DONTROUTE);
	eval 'sub MSG_TRYHARD () {4;}' unless defined(&MSG_TRYHARD);
	eval 'sub MSG_CTRUNC () {8;}' unless defined(&MSG_CTRUNC);
	eval 'sub MSG_PROBE () {0x10;}' unless defined(&MSG_PROBE);
	eval 'sub MSG_TRUNC () {0x20;}' unless defined(&MSG_TRUNC);
	eval 'sub MSG_DONTWAIT () {0x40;}' unless defined(&MSG_DONTWAIT);
	eval 'sub MSG_EOR () {0x80;}' unless defined(&MSG_EOR);
	eval 'sub MSG_WAITALL () {0x100;}' unless defined(&MSG_WAITALL);
	eval 'sub MSG_FIN () {0x200;}' unless defined(&MSG_FIN);
	eval 'sub MSG_SYN () {0x400;}' unless defined(&MSG_SYN);
	eval 'sub MSG_CONFIRM () {0x800;}' unless defined(&MSG_CONFIRM);
	eval 'sub MSG_RST () {0x1000;}' unless defined(&MSG_RST);
	eval 'sub MSG_ERRQUEUE () {0x2000;}' unless defined(&MSG_ERRQUEUE);
	eval 'sub MSG_NOSIGNAL () {0x4000;}' unless defined(&MSG_NOSIGNAL);
	eval 'sub MSG_MORE () {0x8000;}' unless defined(&MSG_MORE);
	eval 'sub MSG_EOF () { &MSG_FIN;}' unless defined(&MSG_EOF);
	eval 'sub SOL_IP () {0;}' unless defined(&SOL_IP);
	eval 'sub SOL_TCP () {6;}' unless defined(&SOL_TCP);
	eval 'sub SOL_UDP () {17;}' unless defined(&SOL_UDP);
	eval 'sub SOL_IPV6 () {41;}' unless defined(&SOL_IPV6);
	eval 'sub SOL_ICMPV6 () {58;}' unless defined(&SOL_ICMPV6);
	eval 'sub SOL_RAW () {255;}' unless defined(&SOL_RAW);
	eval 'sub SOL_IPX () {256;}' unless defined(&SOL_IPX);
	eval 'sub SOL_AX25 () {257;}' unless defined(&SOL_AX25);
	eval 'sub SOL_ATALK () {258;}' unless defined(&SOL_ATALK);
	eval 'sub SOL_NETROM () {259;}' unless defined(&SOL_NETROM);
	eval 'sub SOL_ROSE () {260;}' unless defined(&SOL_ROSE);
	eval 'sub SOL_DECNET () {261;}' unless defined(&SOL_DECNET);
	eval 'sub SOL_X25 () {262;}' unless defined(&SOL_X25);
	eval 'sub SOL_PACKET () {263;}' unless defined(&SOL_PACKET);
	eval 'sub SOL_ATM () {264;}' unless defined(&SOL_ATM);
	eval 'sub SOL_AAL () {265;}' unless defined(&SOL_AAL);
	eval 'sub SOL_IRDA () {266;}' unless defined(&SOL_IRDA);
	eval 'sub IPX_TYPE () {1;}' unless defined(&IPX_TYPE);
    }
}
1;
