/* * Copyright (C) 2003 Sam Horrocks * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifdef SPEEDY_BACKEND # define PERL_CORE #endif #include #include #include #include /* For sockets */ #ifndef VMS # ifdef I_SYS_TYPES # include # endif #include #ifdef MPE # define PF_INET AF_INET # define PF_UNIX AF_UNIX # define SOCK_RAW 3 #endif #ifdef I_SYS_UN #include #endif # ifdef I_NETINET_IN # include # endif #include #ifdef I_ARPA_INET # include #endif #else #include "sockadapt.h" #endif #ifndef INADDR_LOOPBACK #define INADDR_LOOPBACK 0x7F000001 #endif /* INADDR_LOOPBACK */ /* Various */ #ifdef I_UNISTD #include #endif /* For fcntl */ #ifdef I_FCNTL #include #endif /* For waitpid */ #ifdef I_SYS_WAIT #include #endif /* For readv/writev. I_SYSUIO is new in perl 5.6 */ #if defined(I_SYSUIO) || PATCHLEVEL < 6 #include #endif /* Found in pp_sys.c... */ /* fcntl.h might not have been included, even if it exists, because the current Configure only sets I_FCNTL if it's needed to pick up the *_OK constants. Make sure it has been included before testing the fcntl() locking constants. */ # if defined(HAS_FCNTL) && !defined(I_FCNTL) # include # endif /* For mmap */ /* We should use I_SYS_MMAN here, but it doesn't seem to work yet */ #ifndef _WIN32 #include #endif /* For kill, sig* functions */ #if !defined(_WIN32) && (!defined(NSIG) || defined(M_UNIX) || defined(M_XENIX)) #include #endif