fix up socklet_t compile bug as posted on http://www.neostats.net/boards/viewtopic.php?t=1363
This commit is contained in:
parent
bd6e4349c9
commit
86430b117e
5 changed files with 94 additions and 23 deletions
|
@ -7,6 +7,7 @@ Open Proxy Scanning Bot Module for NeoStats Changelog.
|
||||||
- SET interface for nick/user/host/realname added (M)
|
- SET interface for nick/user/host/realname added (M)
|
||||||
- Ported to core command processor (M)
|
- Ported to core command processor (M)
|
||||||
- Add verbose option so we can turn off some messages from OPSB (M)
|
- Add verbose option so we can turn off some messages from OPSB (M)
|
||||||
|
- Fixed socklen_t compile problems on older bsd's (F)
|
||||||
|
|
||||||
* Version 2.1 * 24/01/2004 * Fish (F)
|
* Version 2.1 * 24/01/2004 * Fish (F)
|
||||||
- Sync up libopm with blitzed version to fix a Socks 5 bug (F)
|
- Sync up libopm with blitzed version to fix a Socks 5 bug (F)
|
||||||
|
|
14
aclocal.m4
vendored
14
aclocal.m4
vendored
|
@ -130,3 +130,17 @@ ac_cv_socket_libs, [
|
||||||
|
|
||||||
AC_SUBST(ETR_SOCKET_LIBS)
|
AC_SUBST(ETR_SOCKET_LIBS)
|
||||||
]) dnl ETR_SOCKET_NSL
|
]) dnl ETR_SOCKET_NSL
|
||||||
|
AC_DEFUN([TYPE_SOCKLEN_T],
|
||||||
|
[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
|
||||||
|
[
|
||||||
|
AC_TRY_COMPILE(
|
||||||
|
[#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>],
|
||||||
|
[socklen_t len = 42; return 0;],
|
||||||
|
ac_cv_type_socklen_t=yes,
|
||||||
|
ac_cv_type_socklen_t=no)
|
||||||
|
])
|
||||||
|
if test $ac_cv_type_socklen_t != yes; then
|
||||||
|
AC_DEFINE(socklen_t, int, "have socklet_t defined?")
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
61
configure
vendored
61
configure
vendored
|
@ -1268,14 +1268,17 @@ PACKAGE=OPSB
|
||||||
MODULE_MAJOR=2
|
MODULE_MAJOR=2
|
||||||
MODULE_MINOR=1
|
MODULE_MINOR=1
|
||||||
VERSION=$MODULE_MAJOR.$MODULE_MINOR
|
VERSION=$MODULE_MAJOR.$MODULE_MINOR
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define MODULE_VERSION "$VERSION"
|
#define MODULE_VERSION "$VERSION"
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define MODULE_MAJOR "$MODULE_MAJOR"
|
#define MODULE_MAJOR "$MODULE_MAJOR"
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define MODULE_MINOR "$MODULE_MINOR"
|
#define MODULE_MINOR "$MODULE_MINOR"
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
@ -3351,6 +3354,61 @@ _ACEOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: checking for socklen_t" >&5
|
||||||
|
echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_type_socklen_t+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
#line $LINENO "configure"
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
socklen_t len = 42; return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||||
|
(eval $ac_compile) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -s conftest.$ac_objext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
ac_cv_type_socklen_t=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
ac_cv_type_socklen_t=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
|
||||||
|
if test $ac_cv_type_socklen_t != yes; then
|
||||||
|
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define socklen_t int
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
|
echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
|
||||||
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
|
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
|
||||||
if test "${ac_cv_header_time+set}" = set; then
|
if test "${ac_cv_header_time+set}" = set; then
|
||||||
|
@ -4335,7 +4393,8 @@ if test "${enable_debug+set}" = set; then
|
||||||
case "$enableval" in
|
case "$enableval" in
|
||||||
yes)
|
yes)
|
||||||
CFLAGS="$CFLAGS -ggdb"
|
CFLAGS="$CFLAGS -ggdb"
|
||||||
cat >>confdefs.h <<\_ACEOF
|
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
#define DEBUG 1
|
#define DEBUG 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@ PACKAGE=OPSB
|
||||||
MODULE_MAJOR=2
|
MODULE_MAJOR=2
|
||||||
MODULE_MINOR=1
|
MODULE_MINOR=1
|
||||||
VERSION=$MODULE_MAJOR.$MODULE_MINOR
|
VERSION=$MODULE_MAJOR.$MODULE_MINOR
|
||||||
AC_DEFINE_UNQUOTED(MODULE_VERSION, "$VERSION")
|
AC_DEFINE_UNQUOTED(MODULE_VERSION, "$VERSION", "Module Version")
|
||||||
AC_DEFINE_UNQUOTED(MODULE_MAJOR, "$MODULE_MAJOR")
|
AC_DEFINE_UNQUOTED(MODULE_MAJOR, "$MODULE_MAJOR", "Major Version")
|
||||||
AC_DEFINE_UNQUOTED(MODULE_MINOR, "$MODULE_MINOR")
|
AC_DEFINE_UNQUOTED(MODULE_MINOR, "$MODULE_MINOR", "Minor Version" )
|
||||||
DIRINST=~/NeoStats/
|
DIRINST=~/NeoStats/
|
||||||
AC_PREFIX_DEFAULT(~/NeoStats/)
|
AC_PREFIX_DEFAULT(~/NeoStats/)
|
||||||
CFLAGS="$CFLAGS -O2 -Wall"
|
CFLAGS="$CFLAGS -O2 -Wall"
|
||||||
|
@ -27,6 +27,7 @@ AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h strings.h)
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
|
TYPE_SOCKLEN_T
|
||||||
AC_HEADER_TIME
|
AC_HEADER_TIME
|
||||||
|
|
||||||
AC_FUNC_SNPRINTF
|
AC_FUNC_SNPRINTF
|
||||||
|
@ -106,7 +107,7 @@ AC_ARG_ENABLE(debug,
|
||||||
[ case "$enableval" in
|
[ case "$enableval" in
|
||||||
yes)
|
yes)
|
||||||
CFLAGS="$CFLAGS -ggdb"
|
CFLAGS="$CFLAGS -ggdb"
|
||||||
AC_DEFINE(DEBUG,1)
|
AC_DEFINE(DEBUG,1, Enable Debugging)
|
||||||
AC_MSG_RESULT(yes - Watch your Log Files)
|
AC_MSG_RESULT(yes - Watch your Log Files)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -1,18 +1,8 @@
|
||||||
/* define this to enable debug code for this module */
|
/* modconfig.h.in. Generated from configure.in by autoheader. */
|
||||||
|
|
||||||
|
/* Enable Debugging */
|
||||||
#undef DEBUG
|
#undef DEBUG
|
||||||
|
|
||||||
/* Version number of package */
|
|
||||||
#undef MODULE_VERSION
|
|
||||||
|
|
||||||
/* Major Version */
|
|
||||||
#undef MODULE_MAJOR
|
|
||||||
|
|
||||||
/* Minor Version */
|
|
||||||
#undef MODULE_MINOR
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
|
||||||
#undef HAVE_DLFCN_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||||
#undef HAVE_FCNTL_H
|
#undef HAVE_FCNTL_H
|
||||||
|
|
||||||
|
@ -70,8 +60,14 @@
|
||||||
/* Define to 1 if you have the `vsnprintf' function. */
|
/* Define to 1 if you have the `vsnprintf' function. */
|
||||||
#undef HAVE_VSNPRINTF
|
#undef HAVE_VSNPRINTF
|
||||||
|
|
||||||
/* Name of package */
|
/* "Major Version" */
|
||||||
#undef PACKAGE
|
#undef MODULE_MAJOR
|
||||||
|
|
||||||
|
/* "Minor Version" */
|
||||||
|
#undef MODULE_MINOR
|
||||||
|
|
||||||
|
/* "Module Version" */
|
||||||
|
#undef MODULE_VERSION
|
||||||
|
|
||||||
/* Define to the address where bug reports for this package should be sent. */
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
#undef PACKAGE_BUGREPORT
|
#undef PACKAGE_BUGREPORT
|
||||||
|
@ -97,9 +93,6 @@
|
||||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
#undef TIME_WITH_SYS_TIME
|
#undef TIME_WITH_SYS_TIME
|
||||||
|
|
||||||
/* Version number of package */
|
|
||||||
#undef VERSION
|
|
||||||
|
|
||||||
/* Define to 1 if your processor stores words with the most significant byte
|
/* Define to 1 if your processor stores words with the most significant byte
|
||||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||||
#undef WORDS_BIGENDIAN
|
#undef WORDS_BIGENDIAN
|
||||||
|
@ -109,3 +102,6 @@
|
||||||
|
|
||||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||||
#undef size_t
|
#undef size_t
|
||||||
|
|
||||||
|
/* "have socklet_t defined?" */
|
||||||
|
#undef socklen_t
|
||||||
|
|
Reference in a new issue