⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 sock protocol ,it is useful!
💻 IN
📖 第 1 页 / 共 3 页
字号:
if test x$check_const = xyes; then    AC_C_CONSTfiAC_MSG_CHECKING(whether <netdb.h> declares h_errno)AC_EGREP_CPP(h_errno, [#include <netdb.h>], [AC_DEFINE(HAVE_H_ERRNO)    AC_MSG_RESULT(yes)],   [AC_MSG_RESULT(no)])#XXXsys/socket.h?AC_MSG_CHECKING(for struct ip_opts in <netinet/in.h>)AC_EGREP_CPP([struct.*ipoption], [#include <netinet/ip_var.h>], [AC_DEFINE(HAVE_STRUCT_IPOPTS)    AC_MSG_RESULT(yes)],   AC_MSG_RESULT(no))AC_MSG_CHECKING(whether <sys/types.h> defines inline)AC_EGREP_CPP(yes, [#include <sys/types.h>#ifdef inlineyes#endif], [AC_MSG_RESULT(yes)],   [AC_MSG_RESULT(no)    check_inline="yes"])if test x$check_inline="yes";then    AC_C_INLINEfiAC_TYPE_UID_TAC_TYPE_OFF_TAC_TYPE_PID_TAC_TYPE_SIZE_TAC_STRUCT_ST_BLKSIZEAC_HEADER_TIMEAC_STRUCT_TMAC_STRUCT_TIMEZONEAC_MSG_CHECKING(to see if openlog accepts LOG_PERROR)AC_EGREP_CPP(yes, [#include <syslog.h>#ifdef LOG_PERRORyes#endif], [AC_DEFINE(HAVE_OPENLOG_LOG_PERROR)    AC_MSG_RESULT(yes)],   AC_MSG_RESULT(no))AC_MSG_CHECKING(to see if stdlib.h defines EXIT_FAILURE)AC_EGREP_CPP(yes, [#include <stdlib.h>#ifdef EXIT_FAILUREyes#endif], [AC_MSG_RESULT(yes)],   [AC_DEFINE(NEED_EXIT_FAILURE)    AC_MSG_RESULT(no)])#XXX actually checks if AF_UNIX should be used instead of AF_LOCALAC_MSG_CHECKING(whether <sys/socket.h> uses AF_UNIX)AC_EGREP_CPP(yes, [#include <sys/types.h>#include <sys/socket.h>#ifdef AF_LOCAL#else#ifdef AF_UNIXyes#endif#endif], [AC_DEFINE(NEED_AF_LOCAL)    AC_MSG_RESULT(yes)],   AC_MSG_RESULT(no))AC_MSG_CHECKING(for SIGINFO)AC_EGREP_CPP(yes, [#include <signal.h>#ifdef SIGINFOyes#endif], [AC_DEFINE(HAVE_SIGNAL_SIGINFO)    AC_MSG_RESULT(yes)],   AC_MSG_RESULT(no))AC_MSG_CHECKING(to see if MSG_WAITALL exists)AC_EGREP_CPP(yes, [#include <sys/socket.h>#ifdef MSG_WAITALLyes#endif], [AC_DEFINE(HAVE_MSG_WAITALL)    AC_MSG_RESULT(yes)],   AC_MSG_RESULT(no))#SO_SNDLOWAT#irix 6.2 only seems to look at lowest 8 bit of value#solaris also seems to be broken (up to 2.6 atleast)AC_MSG_CHECKING(whether a working SO_SNDLOWAT exists)AC_EGREP_CPP(yes, [#include <sys/socket.h>#ifdef SO_SNDLOWATyes#endif], [case $host in	*bsd*)		so_sndlowat=t	;;	*-osf*)		so_sndlowat=t	;;esacif test "x${so_sndlowat}" = xt; then	AC_DEFINE(HAVE_SO_SNDLOWAT)	AC_MSG_RESULT(yes)else	AC_MSG_RESULT(disabled)	AC_MSG_WARN(performance in the server might be degraded without support for the SO_SNDLOWAT socket option)fi], [AC_MSG_RESULT(no)      AC_MSG_WARN(performance in the server might be degraded without support for the SO_SNDLOWAT socket option)])AC_MSG_CHECKING(whether realloc with a NULL pointer calls malloc)AC_TRY_RUN([#include <stdlib.h>#ifndef NULL#define NULL (char *)0#endifint main(){	/* will assume this test doesn\'t fail because of lack of memory */	if (realloc(NULL, 1) == NULL)		return 1;	else		return 0;}], [AC_MSG_RESULT(yes)],    [AC_DEFINE(HAVE_NOMALLOC_REALLOC)     AC_MSG_RESULT(no)])AC_MSG_CHECKING(whether free with can be called with NULL)AC_TRY_RUN([#include <stdlib.h>#ifndef NULL#define NULL (char *)0#endifint main(){	/* will assume core dump/seg fault if it doesn\'t work */	free(NULL);	return 0;}], [AC_MSG_RESULT(yes)],    [AC_DEFINE(HAVE_NONULL_FREE)     AC_MSG_RESULT(no)])#A good time to save the cache (L_SOCKPROTO might fail)AC_CACHE_SAVE#find prototypes for interposition.cif test x$no_preload != xt; thenunset failprotoif test "x${ac_cv_header_stdc}" = xyes; then#does $CPP define __STDC__?AC_EGREP_CPP(yes, [#ifdef __STDC__yes#endif], [CPPFLAG_STDC=""], [CPPFLAG_STDC="-D__STDC__"])#L_SOCKPROTO is used to determine the argument types of the functions#which are used in dlib/interposition.c. It compares the prototypes in#(mainly) <sys/socket.h> and compares them to a list of known#values. The arguments to L_SOCKPROTO are:#1: the name of the function#2: shell code which is executed if no known prototype is found#3...: a list of known types, the first is a list of known return values,#      the second a list of known values for the first argument etc.#To add new values to the list simply add the new values at the end of#the list.L_SOCKPROTO(connect, [failproto=t],["int"],["int"],["const struct sockaddr *" "__CONST_SOCKADDR_ARG" "struct sockaddr *" "const void *" "__const struct sockaddr *"],["socklen_t" "int" "size_t"])L_SOCKPROTO(accept, [failproto=t],["int"],["int"],["struct sockaddr *" "__SOCKADDR_ARG" "__const struct sockaddr *" "void *"],["socklen_t *" "int *" "Psocklen_t" "size_t"])L_SOCKPROTO(bind, [failproto=t],["int"],["int"],["const struct sockaddr *" "__CONST_SOCKADDR_ARG" "struct sockaddr *" "const void *" "__const struct sockaddr *"],["socklen_t" "int" "size_t"])L_SOCKPROTO(getpeername, [failproto=t],["int"],["int"],["struct sockaddr *" "__SOCKADDR_ARG" "void *"],["socklen_t *" "int *" "Psocklen_t" "size_t *"])L_SOCKPROTO(getsockname, [failproto=t],["int"],["int"],["struct sockaddr *" "__SOCKADDR_ARG" "void *"],["int *" "socklen_t *" "Psocklen_t" "size_t *"])L_SOCKPROTO(recvfrom, [failproto=t],["ssize_t" "int"],["int"],["void *" "char *"],["size_t" "int"],["int" "unsigned int"],["struct sockaddr *" "__SOCKADDR_ARG" "void *"],["socklen_t *" "int *" "Psocklen_t" "size_t *"])L_SOCKPROTO(send, [failproto=t],["ssize_t" "int"],["int"],["const void *" "__const void *" "const char *"],["size_t" "int"],["int" "unsigned int"])L_SOCKPROTO(sendto, [failproto=t],["ssize_t" "int"],["int"],["const void *" "__const void *" "const char *"],["size_t" "int"],["int" "unsigned int"],["const struct sockaddr *" "__CONST_SOCKADDR_ARG" "const void *" "__const struct sockaddr *"],["socklen_t" "int" "size_t"])L_SOCKPROTO(recv, [failproto=t],["ssize_t" "int"],["int"],["void *" "char *"],["size_t" "int"],["int" "unsigned int"])L_SOCKPROTO(readv, [failproto=t],["ssize_t" "int"],["int"],["const struct iovec *" "__const struct iovec *" "struct iovec *"],["int" "size_t"])L_SOCKPROTO(recvmsg, [failproto=t],["ssize_t" "int"],["int"],["struct msghdr *"],["int" "unsigned int"])L_SOCKPROTO(writev, [failproto=t],["ssize_t" "int"],["int"],["const struct iovec *" "__const struct iovec *"],["int" "size_t"])L_SOCKPROTO(sendmsg, [failproto=t],["ssize_t" "int"],["int"],["const struct msghdr *" "__const struct msghdr *"],["int" "unsigned int"])L_SOCKPROTO(write, [failproto=t],["ssize_t"],["int"],["const void *" "__const void *"],["size_t" "unsigned"])L_SOCKPROTO(read, [failproto=t],["ssize_t"],["int"],["void *"],["size_t" "unsigned"])if test x$failproto != x; then    echo ""    echo "error: some unfamiliar function prototypes were found,"    echo "       and will probably mean that building of libdsocks,"    echo "       which allows on-the-fly socksification of dynamic"    echo "       binaries will not work."    echo ""    echo "       You have several options:"    echo ""    echo "       1. If you do not need libdsocks, run configure with the"    echo "          option --disable-preload."    echo "       2. Send the output from configure to dante-bugs@inet.no"    echo "          and if possible you'll get a patch fixing the problem."    echo "          If you think this might be a generic problem, sending"    echo "          the output might allow the problem to be solved for all"    echo "          users of your platform in the next release."    echo "       3. Fix the problem yourself. If you have autoconf installed,"    echo "          using the output above to modify configure.in should"    echo "          enable you to compile without problems."    exit 1fielse    #defaults    AC_DEFINE(HAVE_PROT_CONNECT_0, int)    AC_DEFINE(HAVE_PROT_CONNECT_1, int)    AC_DEFINE(HAVE_PROT_CONNECT_2, const struct sockaddr *)    AC_DEFINE(HAVE_PROT_CONNECT_3, socklen_t)    AC_DEFINE(HAVE_PROT_ACCEPT_0, int)    AC_DEFINE(HAVE_PROT_ACCEPT_1, int)    AC_DEFINE(HAVE_PROT_ACCEPT_2, struct sockaddr *)    AC_DEFINE(HAVE_PROT_ACCEPT_3, socklen_t *)    AC_DEFINE(HAVE_PROT_BIND_0, int)    AC_DEFINE(HAVE_PROT_BIND_1, int)    AC_DEFINE(HAVE_PROT_BIND_2, const struct sockaddr *)    AC_DEFINE(HAVE_PROT_BIND_3, socklen_t)    AC_DEFINE(HAVE_PROT_GETPEERNAME_0, int)    AC_DEFINE(HAVE_PROT_GETPEERNAME_1, int)    AC_DEFINE(HAVE_PROT_GETPEERNAME_2, struct sockaddr *)    AC_DEFINE(HAVE_PROT_GETPEERNAME_3, socklen_t *)    AC_DEFINE(HAVE_PROT_GETSOCKNAME_0, int)    AC_DEFINE(HAVE_PROT_GETSOCKNAME_1, int)    AC_DEFINE(HAVE_PROT_GETSOCKNAME_2, struct sockaddr *)    AC_DEFINE(HAVE_PROT_GETSOCKNAME_3, socklen_t *)    AC_DEFINE(HAVE_PROT_RECVFROM_0, ssize_t)    AC_DEFINE(HAVE_PROT_RECVFROM_1, int)    AC_DEFINE(HAVE_PROT_RECVFROM_2, void *)    AC_DEFINE(HAVE_PROT_RECVFROM_3, size_t)    AC_DEFINE(HAVE_PROT_RECVFROM_4, int)    AC_DEFINE(HAVE_PROT_RECVFROM_5, struct sockaddr *)    AC_DEFINE(HAVE_PROT_RECVFROM_6, socklen_t *)    AC_DEFINE(HAVE_PROT_SEND_0, ssize_t)    AC_DEFINE(HAVE_PROT_SEND_1, int)    AC_DEFINE(HAVE_PROT_SEND_2, const void *)    AC_DEFINE(HAVE_PROT_SEND_3, size_t)    AC_DEFINE(HAVE_PROT_SEND_4, int)    AC_DEFINE(HAVE_PROT_RECV_0, ssize_t)    AC_DEFINE(HAVE_PROT_RECV_1, int)    AC_DEFINE(HAVE_PROT_RECV_2, void *)    AC_DEFINE(HAVE_PROT_RECV_3, size_t)    AC_DEFINE(HAVE_PROT_RECV_4, int)    AC_DEFINE(HAVE_PROT_SENDTO_0, ssize_t)    AC_DEFINE(HAVE_PROT_SENDTO_1, int)    AC_DEFINE(HAVE_PROT_SENDTO_2, const void *)    AC_DEFINE(HAVE_PROT_SENDTO_3, size_t)    AC_DEFINE(HAVE_PROT_SENDTO_4, int)    AC_DEFINE(HAVE_PROT_SENDTO_5, const struct sockaddr *)    AC_DEFINE(HAVE_PROT_SENDTO_6, socklen_t)    AC_DEFINE(HAVE_PROT_READV_0, ssize_t)    AC_DEFINE(HAVE_PROT_READV_1, int)    AC_DEFINE(HAVE_PROT_READV_2, const struct iovec *)    AC_DEFINE(HAVE_PROT_READV_3, int)    AC_DEFINE(HAVE_PROT_WRITEV_0, ssize_t)    AC_DEFINE(HAVE_PROT_WRITEV_1, int)    AC_DEFINE(HAVE_PROT_WRITEV_2, const struct iovec *)    AC_DEFINE(HAVE_PROT_WRITEV_3, int)    AC_DEFINE(HAVE_PROT_RECVMSG_0, ssize_t)    AC_DEFINE(HAVE_PROT_RECVMSG_1, int)    AC_DEFINE(HAVE_PROT_RECVMSG_2, struct msghdr *)    AC_DEFINE(HAVE_PROT_RECVMSG_3, int)    AC_DEFINE(HAVE_PROT_SENDMSG_0, ssize_t)    AC_DEFINE(HAVE_PROT_SENDMSG_1, int)    AC_DEFINE(HAVE_PROT_SENDMSG_2, const struct msghdr *)    AC_DEFINE(HAVE_PROT_SENDMSG_3, int)    AC_DEFINE(HAVE_PROT_WRITE_0, ssize_t)    AC_DEFINE(HAVE_PROT_WRITE_1, int)    AC_DEFINE(HAVE_PROT_WRITE_2, const void *)    AC_DEFINE(HAVE_PROT_WRITE_3, size_t)    AC_DEFINE(HAVE_PROT_READ_0, ssize_t)    AC_DEFINE(HAVE_PROT_READ_1, int)    AC_DEFINE(HAVE_PROT_READ_2, void *)    AC_DEFINE(HAVE_PROT_READ_3, size_t)fi #stdc_headersfi #no preloadAC_MSG_CHECKING(if getsockopt needs cast)AC_TRY_COMPILE([#include <sys/types.h>#include <sys/socket.h>int getsockopt(int, int, int, char *, int *);], [ 1 ], [AC_DEFINE(NEED_GETSOCKOPT_CAST)  AC_MSG_RESULT(yes)], AC_MSG_RESULT(no))#include both <sys/ioctl.h> and <sys/sockio.h>?if test x$have_sys_sockio_h = xt; then	AC_MSG_CHECKING(to see if <sys/sockio.h> should be included)	AC_EGREP_CPP(yes, [#include <sys/ioctl.h>#ifdef SIOCATMARK#else#include <sys/sockio.h>#ifdef SIOCATMARKyes#endif#endif], [AC_DEFINE(NEED_SYS_SOCKIO_H)    AC_MSG_RESULT(yes)],   AC_MSG_RESULT(no))fi#XXX should be more generic, check if nonexistent

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -