$ uname -a HP-UX joe B.11.11 U 9000/782 2004626987 unlimited-user license $ ./configure Configuring GNU Pth (Portable Threads), Version 2.0.0 (17-Feb-2003) Copyright (c) 1999-2003 Ralf S. Engelschall Platform: hppa2.0w-hp-hpux11.11 Build Tools: checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking whether make sets $(MAKE)... yes checking for compiler option -pipe... yes checking for compilation debug mode... disabled checking for compilation profile mode... disabled checking for compilation optimization mode... disabled checking build system type... hppa2.0w-hp-hpux11.11 checking host system type... hppa2.0w-hp-hpux11.11 checking for ld used by GCC... /usr/ccs/bin/ld checking if the linker (/usr/ccs/bin/ld) is GNU ld... no checking for /usr/ccs/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -p checking for a sed that does not truncate output... /usr/bin/sed checking whether ln -s works... yes checking how to recognise dependent libraries... file_magic (s[0-9][0-9][0-9]|Py checking command to parse /usr/bin/nm -p output... ok checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... no checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for ranlib... ranlib checking for strip... strip checking for objdir... .libs checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.lo... yes checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/ccs/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... relink checking whether stripping libraries is possible... no checking dynamic linker characteristics... hpux11.11 dld.sl checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes creating libtool Mandatory Platform Environment: checking for ANSI C header files... (cached) yes checking stdio.h usability... yes checking stdio.h presence... yes checking for stdio.h... yes checking for stdlib.h... (cached) yes checking stdarg.h usability... yes checking stdarg.h presence... yes checking for stdarg.h... yes checking for string.h... (cached) yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking for unistd.h... (cached) yes checking setjmp.h usability... yes checking setjmp.h presence... yes checking for setjmp.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking for sys/types.h... (cached) yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/wait.h usability... yes checking sys/wait.h presence... yes checking for sys/wait.h... yes checking for sys/stat.h... (cached) yes checking sys/socket.h usability... no checking sys/socket.h presence... yes configure: WARNING: sys/socket.h: present but cannot be compiled configure: WARNING: sys/socket.h: check for missing prerequisite headers? configure: WARNING: sys/socket.h: proceeding with the preprocessor's result configure: WARNING: ## ------------------------------------ ## configure: WARNING: ## Report this to address@hidden ## configure: WARNING: ## ------------------------------------ ## checking for sys/socket.h... yes checking for gettimeofday... no checking for select... no checking for sigaction... yes checking for sigprocmask... yes checking for sigpending... yes checking for sigsuspend... yes ./configure:Error: decision on mandatory system headers and functions failed. ./configure:Hint: see config.log for more details! $ cat ~/bla.c #include int main( int argc, char *argv[] ) { puts("Hello"); } $ gcc ~/bla.c In file included from /home/frankdj/bla.c:1: /usr/include/sys/socket.h:439: syntax error before "sendfile" /usr/include/sys/socket.h:440: syntax error before "bsize_t" /usr/include/sys/socket.h:441: syntax error before "sendpath" /usr/include/sys/socket.h:442: syntax error before "bsize_t" $ cat /usr/include/sys/socket.h /* * BEGIN_DESC * * File: socket.h Date: 12/2/1998 * @(#)B.11.11_LR * * Purpose: * Definitions related to sockets: types, address families, options. * * Classification: Release to Release Consistency Req: * <> * kernel subsystem private none * kernel private none * kernel 3rd party private limited source * public binary & source * * BE header: yes * * Shipped: yes * /usr/include/sys/socket.h * /usr/conf/sys/socket.h * * <> * NOTE: * This header file contains information specific to the internals * of the HP-UX implementation. The contents of this header file * are subject to change without notice. Such changes may affect * source code, object code, or binary compatibility between * releases of HP-UX. Code which uses the symbols contained within * this header file is inherently non-portable (even between HP-UX * implementations). * * END_DESC */ #ifndef _SYS_SOCKET_INCLUDED /* allow multiple includes of this file */ #define _SYS_SOCKET_INCLUDED /* without causing compilation errors */ /* * Copyright (c) 1982, 1985, 1986 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, * advertising materials, and other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * * socket.h 7.3 (Berkeley) 6/27/88 */ #include #ifdef _INCLUDE_XOPEN_SOURCE_EXTENDED #include #include #include /* * Types */ #ifndef _CADDR_T # define _CADDR_T typedef char *caddr_t; #endif /* _CADDR_T */ /* * Types of sockets */ #define SOCK_STREAM 1 /* stream socket */ #define SOCK_DGRAM 2 /* datagram socket */ #define SOCK_RAW 3 /* raw-protocol interface */ #define SOCK_RDM 4 /* reliably-delivered message */ #define SOCK_SEQPACKET 5 /* sequenced packet stream */ /* * Option flags per-socket. */ #define SO_DEBUG 0x0001 /* turn on debugging info recording */ #define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ #define SO_REUSEADDR 0x0004 /* allow local address reuse */ #define SO_KEEPALIVE 0x0008 /* keep connections alive */ #define SO_DONTROUTE 0x0010 /* just use interface addresses */ #define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ #define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ #define SO_LINGER 0x0080 /* linger on close if data present */ #define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ #define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ #define SO_GETIFADDR 0x0400 /* HP: save the loc IP addr for inb UDP/ #define SO_PMTU 0x0800 /* HP: advise to use PMTU discovery */ #define SO_INPCB_COPY 0x1000 /* HP: local copy of inpcb */ /* * Additional options, not kept in so_options. */ #define SO_SNDBUF 0x1001 /* send buffer size */ #define SO_RCVBUF 0x1002 /* receive buffer size */ #define SO_SNDLOWAT 0x1003 /* send low-water mark */ #define SO_RCVLOWAT 0x1004 /* receive low-water mark */ #define SO_SNDTIMEO 0x1005 /* send timeout */ #define SO_RCVTIMEO 0x1006 /* receive timeout */ #define SO_ERROR 0x1007 /* get error status and clear */ #define SO_TYPE 0x1008 /* get socket type */ #define SO_SND_COPYAVOID 0x1009 /* avoid copy on send*/ #define SO_RCV_COPYAVOID 0x100a /* avoid copy on rcv */ #define SO_PROTOTYPE 0x100b /* assign protocol for RAW sockets */ #define SO_DISTRIBUTE 0x100c /* distribute UDP datagrams to */ /* multiple streams - internal use */ /* only */ #define SO_GET 1 /* Get socket option for Streams TCP/IP */ #define SO_SET 2 /* Set socket option for Streams TCP/IP */ /* * Structure used for manipulating linger option. * * if l_onoff == 0: * close(2) returns immediately; any buffered data is sent later * (default) * * if l_onoff != 0: * if l_linger == 0, close(2) returns after discarding any unsent data * if l_linger != 0, close(2) does not return until buffered data is sent */ struct linger { int l_onoff; /* 0 = do not wait to send data */ /* non-0 = see l_linger */ int l_linger; /* 0 = discard unsent data */ /* non-0 = wait to send data */ }; /* * Level number for (get/set)sockopt() to apply to socket itself. */ #define SOL_SOCKET 0xffff /* options for socket level */ /* * Address families. */ #define AF_UNSPEC 0 /* unspecified */ #define AF_UNIX 1 /* local to host (pipes, portals) */ #define AF_INET 2 /* internetwork: UDP, TCP, etc. */ #define AF_IMPLINK 3 /* arpanet imp addresses */ #define AF_PUP 4 /* pup protocols: e.g. BSP */ #define AF_CHAOS 5 /* mit CHAOS protocols */ #define AF_NS 6 /* XEROX NS protocols */ #define AF_NBS 7 /* nbs protocols */ #define AF_ECMA 8 /* european computer manufacturers */ #define AF_DATAKIT 9 /* datakit protocols */ #define AF_CCITT 10 /* CCITT protocols, X.25 etc */ #define AF_SNA 11 /* IBM SNA */ #define AF_DECnet 12 /* DECnet */ #define AF_DLI 13 /* Direct data link interface */ #define AF_LAT 14 /* LAT */ #define AF_HYLINK 15 /* NSC Hyperchannel */ #define AF_APPLETALK 16 /* Apple Talk */ #define AF_OTS 17 /* Used for OSI in the ifnets */ #define AF_NIT 18 /* NIT */ #define AF_VME_LINK 19 /* VME backplane protocols */ #define AF_KEY 20 /* IPSec PF_KEY protocol */ #define AF_POLICY 21 /* IPSec PF_POLICY protocol */ #define AF_INET6 22 /* IPv6 protocol */ #define AF_MAX 23 /* Valid values for the "how" argument in the shutdown() function. */ #define SHUT_RD 0 /* Disables further receive operations*/ #define SHUT_WR 1 /* Disables further send operations */ #define SHUT_RDWR 2 /* Disables further send and receive * operations */ /* * Unix98 type used for certain objects in X/Open sockets APIs * whose size will not grow with the architecture, for example * socket address length. * * We choose a definition that is consistent with the Unix95 * profile. However, in future implementations, we may choose * to limit the size to 32 bits in both 32-bit and 64-bit data * models. */ typedef size_t socklen_t; #ifndef _XOPEN_SOURCE_EXTENDED /* * Valid values for the "flags" argument in sendfile()/sendpath(). */ #define SF_DISCONNECT 1 /* Disables further sends and receives */ #endif /* !_XOPEN_SOURCE_EXTENDED */ #if defined(_XOPEN_SOURCE_EXTENDED) && !defined(_KERNEL) /* * Structure used by kernel to store most * addresses (CASPEC/1170). */ #ifndef _SA_FAMILY_T #define _SA_FAMILY_T typedef unsigned short sa_family_t; #endif /* ! _SA_FAMILY_T */ struct sockaddr { sa_family_t sa_family; /* address family */ char sa_data[14]; /* up to 14 bytes of direct address */ }; #else /* * Structure used by kernel to store most * addresses. */ struct sockaddr { unsigned short sa_family; /* address family */ char sa_data[14]; /* up to 14 bytes of direct address */ }; #endif /* _XOPEN_SOURCE_EXTENDED */ #if !defined(_XOPEN_SOURCE_EXTENDED) struct sockaddr_ext { unsigned short sa_family; /* address family */ char sa_data[22]; /* up to 22 bytes of direct address */ }; #endif /* !_XOPEN_SOURCE_EXTENDED */ #ifndef _XOPEN_SOURCE_EXTENDED /* * Structure used by kernel to pass protocol * information in raw sockets. */ struct sockproto { unsigned short sp_family; /* address family */ unsigned short sp_protocol; /* protocol */ }; #endif /* !_XOPEN_SOURCE_EXTENDED */ /* * Protocol families, same as address families for now. */ #define PF_UNSPEC AF_UNSPEC #define PF_UNIX AF_UNIX #define PF_INET AF_INET #define PF_IMPLINK AF_IMPLINK #define PF_PUP AF_PUP #define PF_CHAOS AF_CHAOS #define PF_NS AF_NS #define PF_NBS AF_NBS #define PF_ECMA AF_ECMA #define PF_DATAKIT AF_DATAKIT #define PF_CCITT AF_CCITT #define PF_SNA AF_SNA #define PF_DECnet AF_DECnet #define PF_DLI AF_DLI #define PF_LAT AF_LAT #define PF_HYLINK AF_HYLINK #define PF_APPLETALK AF_APPLETALK #define PF_OTS AF_OTS #define PF_NIT AF_NIT #define PF_VME_LINK AF_VME_LINK #define PF_KEY AF_KEY #define PF_POLICY AF_POLICY #define PF_INET6 AF_INET6 #define PF_MAX AF_MAX /* * Maximum queue length specifiable by listen. */ #define SOMAXCONN 4096 #if defined(_XOPEN_SOURCE_EXTENDED) && !defined(_KERNEL) /* * Message header for recvmsg and sendmsg calls. * Used value-result for recvmsg, value only for sendmsg. */ struct msghdr { void *msg_name; /* optional address */ socklen_t msg_namelen; /* size of address */ struct iovec *msg_iov; /* scatter/gather array */ int msg_iovlen; /* # elements in msg_iov */ void *msg_control; /* ancillary data, see below */ socklen_t msg_controllen; /* ancillary data buffer len */ int msg_flags; /* flags on received message */ }; #else /* * Message header for recvmsg and sendmsg calls. */ struct msghdr { caddr_t msg_name; /* optional address */ int msg_namelen; /* size of address */ struct iovec *msg_iov; /* scatter/gather array */ int msg_iovlen; /* # elements in msg_iov */ caddr_t msg_accrights; /* access rights sent/received */ int msg_accrightslen; }; /* * Message header for recvmsg and sendmsg calls. * Used value-result for recvmsg, value only for sendmsg. */ struct msghdr2 { caddr_t msg_name; /* optional address */ socklen_t msg_namelen; /* size of address */ struct iovec *msg_iov; /* scatter/gather array */ u_int msg_iovlen; /* # elements in msg_iov */ caddr_t msg_control; /* ancillary data, see below */ socklen_t msg_controllen; /* ancillary data buffer_ len */ int msg_flags; /* flags on received message */ }; #endif /* _XOPEN_SOURCE_EXTENDED */ #define MSG_OOB 0x1 /* process out-of-band data */ #define MSG_PEEK 0x2 /* peek at incoming message */ #define MSG_DONTROUTE 0x4 /* send without using routing tables */ #ifdef _XOPEN_SOURCE_EXTENDED #define MSG_EOR 0x8 /* data completes record */ #define MSG_TRUNC 0x10 /* data discarded before delivery */ #define MSG_CTRUNC 0x20 /* control data lost before delivery */ #define MSG_WAITALL 0x40 /* wait for full request or error */ #else #ifdef _KERNEL #define MSG_EOR 0x8 /* data completes record */ #define MSG_TRUNC 0x10 /* data discarded before delivery */ #define MSG_CTRUNC 0x20 /* control data lost before delivery */ #define MSG_WAITALL 0x40 /* wait for full request or error */ #endif /* _KERNEL */ #endif /* _XOPEN_SOURCE_EXTENDED */ #ifdef _KERNEL /* Following used within kernel */ #define MSG_MBUF 0x1000 /* data in kernel, skip uiomove */ #define MSG_NONBLOCK 0x4000 /* nonblocking request */ #define MSG_COMPAT 0x8000 /* 4.3-format sockaddr */ #endif /* _KERNEL */ #define MSG_MAXIOVLEN 16 #if defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL) /* * Given a byte length, align it to word boundary, aligned for cmsghdr. */ #define _CMSG_ALIGN(p) (((p) + (int)sizeof(socklen_t) - 1) & ~((int)sizeof(soc) /* * Header for ancillary data objects in msg_control buffer. * Used for additional information with/about a datagram * not expressible by flags. The format is a sequence * of message elements headed by cmsghdr structures. */ struct cmsghdr { socklen_t cmsg_len; /* data byte count, including hdr */ int cmsg_level; /* originating protocol */ int cmsg_type; /* protocol-specific type */ /* followed by u_char cmsg_data[]; */ }; /* given pointer to struct cmsghdr, return pointer to data */ #define CMSG_DATA(cmsg) ((unsigned char *)((cmsg) + 1)) /* given pointer to struct cmsghdr, return pointer to next cmsghdr */ #define CMSG_NXTHDR(mhdr, cmsg) \ (((caddr_t)(cmsg) + (cmsg)->cmsg_len + (int)sizeof(struct cmsghdr) > \ (caddr_t)((mhdr)->msg_control) + (mhdr)->msg_controllen) ? \ (struct cmsghdr *)0 : \ (struct cmsghdr *)((caddr_t)(cmsg) + _CMSG_ALIGN((cmsg)->cmsg_len))) #define CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control) /* "Socket"-level control message types: */ #define SCM_RIGHTS 0x01 /* access rights (array of int) */ #endif /* _XOPEN_SOURCE_EXTENDED || _KERNEL */ /* BSDIPC system calls */ #ifndef _KERNEL #if defined(_XOPEN_SOURCE_EXTENDED) && !defined(_KERNEL) #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ extern int accept __((int, struct sockaddr *, socklen_t *)); extern int bind __((int, const struct sockaddr *, socklen_t)); extern int connect __((int, const struct sockaddr *, socklen_t)); extern int getpeername __((int, struct sockaddr *, socklen_t *)); extern int getsockname __((int, struct sockaddr *, socklen_t *)); extern int getsockopt __((int, int, int, void *, socklen_t *)); extern int listen __((int, int)); extern ssize_t recv __((int, void *, size_t, int)); extern ssize_t recvfrom __((int, void *, size_t, int, struct sockaddr *, socklen_t *)); extern ssize_t recvmsg __((int, struct msghdr *, int)); extern ssize_t send __((int, const void *, size_t, int)); extern ssize_t sendmsg __((int, const struct msghdr *, int)); extern ssize_t sendto __((int, const void *, size_t, int, const struct sockaddr *, socklen_t)); extern int setsockopt __((int, int, int, const void *, socklen_t)); extern int shutdown __((int, int)); extern int socket __((int, int, int)); extern int socketpair __((int, int, int, int[2])); #ifdef __cplusplus } #endif /* __cplusplus */ #else /* !_XOPEN_SOURCE_EXTENDED*/ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ extern int accept __((int, void *, int *)); extern int bind __((int, const void *, int)); extern int connect __((int, const void *, int)); extern int getpeername __((int, void *, int *)); extern int getsockname __((int, void *, int *)); extern int getsockopt __((int, int, int, void *, int *)); extern int listen __((int, int)); extern int recv __((int, void *, int, int)); extern int recvfrom __((int, void *, int, int, void *, int *)); extern int recvmsg __((int, struct msghdr msg[], int)); extern int send __((int, const void *, int, int)); extern int sendto __((int, const void *, int, int, const void *, int)); extern int sendmsg __((int, const struct msghdr msg[], int)); extern int setsockopt __((int, int, int, const void *, int)); extern int shutdown __((int, int)); extern int socket __((int, int, int)); extern int socketpair __((int, int, int, int[2])); extern sbsize_t sendfile __((int, int, off_t, bsize_t, const struct iovec *, int)); extern sbsize_t sendpath __((int, char *, off_t, bsize_t, const struct iovec *, int)); #if defined(_LARGEFILE64_SOURCE) #ifdef __LP64__ #define sendfile64 sendfile #define sendpath64 sendpath #else /* __LP64__ */ extern sbsize64_t sendfile64 __((int, int, off64_t, bsize64_t, const struct iovec *, int)); extern sbsize64_t sendpath64 __((int, char *, off64_t, bsize64_t, const struct iovec *, int)); #endif /* __LP64 */ #endif /* _LARGEFILE64_SOURCE */ #ifdef _APP32_64BIT_OFF_T extern sbsize64_t __sendfile64 __((int,int,off_t,bsize_t, const struct iovec *,; extern sbsize64_t __sendpath64 __((int,char *,off_t,bsize_t,const struct iovec ; #ifndef __cplusplus static sbsize_t sendfile(a,b,c,d,e,f) int a,b,f; off_t c; bsize_t d; const stru} static sbsize_t sendpath(a,b,c,d,e,f) int a,f; char *b; off_t c; bsize_t d; con} #endif /* __cplusplus */ #endif /* _APP32_64BIT_OFF_T */ #ifdef __cplusplus } #endif /* __cplusplus */ #if defined(__cplusplus) && defined(_APP32_64BIT_OFF_T) inline sbsize_t sendfile __((int,int,off_t,bsize_t,const struct iovec *,int)); inline sbsize_t sendpath __((int,char *,off_t,bsize_t, const struct iovec *,int; inline sbsize_t sendfile(a,b,c,d,e,f) int a,b,f; off_t c; bsize_t d; const stru} inline sbsize_t sendpath(a,b,c,d,e,f) int a,f; char *b; off_t c; bsize_t d; con} #endif /* __cplusplus && _APP32_64BIT_OFF_T */ #endif /* !_XOPEN_SOURCE_EXTENDED*/ #ifndef _XOPEN_SOURCE_EXTENDED #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ extern int rcmd __((char **, int, const char *, const char *, const char *, int *)); extern int rexec __((char **, int, const char *, const char *, const char *, int *)); extern int rresvport __((int *)); extern int ruserok __((const char *, int, const char *, const char *)); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* !_XOPEN_SOURCE_EXTENDED */ #endif /* not _KERNEL */ #endif /* _INCLUDE_XOPEN_SOURCE_EXTENDED */ #endif /* not _SYS_SOCKET_INCLUDED */ $ grep sbsize_t /usr/include/sys/*.h /usr/include/sys/socket.h: extern sbsize_t sendfile __((int, int, off_t, bsiz /usr/include/sys/socket.h: extern sbsize_t sendpath __((int, char *, off_t, b /usr/include/sys/socket.h:static sbsize_t sendfile(a,b,c,d,e,f) int a,b,f; off_} /usr/include/sys/socket.h:static sbsize_t sendpath(a,b,c,d,e,f) int a,f; char *} /usr/include/sys/socket.h:inline sbsize_t sendfile __((int,int,off_t,bsize_t,co; /usr/include/sys/socket.h:inline sbsize_t sendpath __((int,char *,off_t,bsize_t; /usr/include/sys/socket.h:inline sbsize_t sendfile(a,b,c,d,e,f) int a,b,f; off_} /usr/include/sys/socket.h:inline sbsize_t sendpath(a,b,c,d,e,f) int a,f; char *} /usr/include/sys/types.h: typedef int64_t sbsize_t; /* signed leng/ /usr/include/sys/types.h: typedef long sbsize_t;