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

📄 ost_socket.m4

📁 multi-line Adjunct Communication Server
💻 M4
字号:
dnl Copyright (C) 1999-2000 Open Source Telecom Corporation.dnl  dnl This program is free software; you can redistribute it and/or modifydnl it under the terms of the GNU General Public License as published bydnl the Free Software Foundation; either version 2 of the License, ordnl (at your option) any later version.dnl dnl This program is distributed in the hope that it will be useful,dnl but WITHOUT ANY WARRANTY; without even the implied warranty ofdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See thednl GNU General Public License for more details.dnl dnl You should have received a copy of the GNU General Public Licensednl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a configuration dnl script generated by Autoconf, you may include it under the same dnl distribution terms that you use for the rest of that program.AC_DEFUN(OST_LIB_SOCKET,[	AC_REQUIRE([OST_HEADER_SYSTIME])	ost_cv_inet_sockets=no	ost_cv_unix_sockets=no	ost_cv_lib_socket="c"	AC_CHECK_HEADERS(sys/socket.h,[		AC_CHECK_HEADERS(select.h sys/select.h)		AC_CHECK_HEADERS(arpa/inet.h,			ost_cv_inet_sockets=yes)		AC_CHECK_HEADERS(sys/un.h,			ost_cv_unix_sockets=yes)		], AC_CHECK_HEADERS(winsock.h,			ost_cv_inet_sockets=yes))	AC_CHECK_LIB(socket, socket, [		ost_cv_lib_socket="socket"		LIBS="$LIBS -lsocket"		])	if test $ost_cv_inet_sockets = yes ; then		AC_DEFINE(HAVE_INET_SOCKETS)		AC_CHECK_LIB($ost_cv_lib_socket, inet_aton,[			AC_DEFINE(HAVE_INET_ATON)])		AC_CACHE_CHECK("for socklen_t defined", ost_cv_socklen_t, [ 			ost_cv_socklen_t='no'			AC_EGREP_HEADER(socklen_t, sys/socket.h,				ost_cv_socklen_t='yes')		])		if test $ost_cv_socklen_t = yes ; then			AC_DEFINE(HAVE_SOCKLEN_T)		fi	fi	if test $ost_cv_unix_sockets = yes ; then		AC_DEFINE(HAVE_UNIX_SOCKETS)	fi])dnl ACCONFIG TEMPLATEdnl #undef HAVE_SYS_SOCKET_Hdnl #undef HAVE_ARPA_INET_Hdnl #undef HAVE_SYS_UN_Hdnl #undef HAVE_SELECT_Hdnl #undef HAVE_SYS_SELECT_Hdnl #undef HAVE_INET_ATONdnl #undef HAVE_INET_SOCKETSdnl #undef HAVE_UNIX_SOCKETSdnl #undef HAVE_SOCKLEN_Tdnl END ACCONFIGdnl ACCONFIG BOTTOMdnl  dnl #ifdef HAVE_WINSOCK_Hdnl #include <winsock.h>dnl #elsednl #ifdef HAVE_SYS_SOCKET_Hdnl #include <sys/socket.h>dnl #ifdef HAVE_SELECT_Hdnl #include <select.h>dnl #elsednl #ifdef HAVE_SYS_SELECT_Hdnl #include <sys/select.h>dnl #endifdnl #endifdnl #ifdef HAVE_ARPA_INET_Hdnl #include <netinet/in.h>dnl #include <arpa/inet.h>dnl #include <netdb.h>dnl #endifdnl #ifdef HAVE_SYS_UN_Hdnl #include <sys/un.h>dnl #endifdnl #endifdnl #endifdnl dnl #ifndef HAVE_INET_ATONdnl #define inet_aton(cp, addr) \dnl 	(((*(unsigned long int *)(addr)) = inet_addr(cp)) != -1)dnl #endifdnl dnl #ifndef SUN_LENdnl #ifdef SCM_RIGHTSdnl #define HAVE_UN_LENdnl #endifdnl #ifdef __linuxdnl #define HAVE_UN_LENdnl #endifdnl #ifdef HAVE_UN_LENdnl #define SUN_LEN(ptr) sizeof(sockaddr_un.sun_len) + \dnl 	sizeof(sockaddr_un.sun_family) + sizeof(sockaddr_un.sun_path) + 1dnl #elsednl #define SUN_LEN(ptr) ((size_t)((struct sockaddr_un *)0)->sun_path) \dnl 	+ strlen((ptr)->sun_path))dnl #endifdnl #endifdnl dnl #ifndef HAVE_SOCKLEN_Tdnl typedef int socklen_t;dnl #endifdnl dnl END ACCONFIG

⌨️ 快捷键说明

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