mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-07 03:13:13 +02:00
remove more unused functions
This commit is contained in:
@@ -6017,21 +6017,6 @@ $as_echo "#define NEED_INET_NTOA /**/" >>confdefs.h
|
||||
fi
|
||||
done
|
||||
|
||||
for ac_func in inet_netof
|
||||
do :
|
||||
ac_fn_c_check_func "$LINENO" "inet_netof" "ac_cv_func_inet_netof"
|
||||
if test "x$ac_cv_func_inet_netof" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_INET_NETOF 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
|
||||
$as_echo "#define NEED_INET_NETOF /**/" >>confdefs.h
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
LIBS="$save_libs"
|
||||
for ac_func in syslog
|
||||
do :
|
||||
|
||||
@@ -445,7 +445,6 @@ save_libs="$LIBS"
|
||||
LIBS="$LIBS $SOCKLIB $INETLIB"
|
||||
AC_CHECK_FUNCS(inet_addr,,AC_DEFINE([NEED_INET_ADDR], [], [Define if you need inet_addr]))
|
||||
AC_CHECK_FUNCS(inet_ntoa,,AC_DEFINE([NEED_INET_NTOA], [], [Define if you need inet_ntoa]))
|
||||
AC_CHECK_FUNCS(inet_netof,,AC_DEFINE([NEED_INET_NETOF], [], [Define if you need inet_netof]))
|
||||
LIBS="$save_libs"
|
||||
AC_CHECK_FUNCS(syslog,AC_DEFINE([HAVE_SYSLOG], [], [Define if you have syslog]))
|
||||
AC_SUBST(STRTOUL)
|
||||
|
||||
@@ -128,10 +128,6 @@ extern unsigned long inet_addr(char *);
|
||||
extern char *inet_ntoa(struct IN_ADDR);
|
||||
#endif
|
||||
|
||||
#ifdef NEED_INET_NETOF
|
||||
extern int inet_netof(struct IN_ADDR);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INET_NTOP
|
||||
const char *inet_ntop(int, const void *, char *, size_t);
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,6 @@ extern const char *inet_ntop(int af, const void *src, char *dst, size_t cnt);
|
||||
extern __u_l inet_addr(char *);
|
||||
extern char *inet_ntoa(struct in_addr);
|
||||
extern int inet_aton(const char *, struct in_addr *);
|
||||
extern int inet_netof(struct in_addr);
|
||||
# endif
|
||||
extern __u_l inet_makeaddr(int, int);
|
||||
extern __u_l inet_network(char *);
|
||||
|
||||
@@ -100,9 +100,6 @@
|
||||
/* Define to 1 if you have the `inet_addr' function. */
|
||||
#undef HAVE_INET_ADDR
|
||||
|
||||
/* Define to 1 if you have the `inet_netof' function. */
|
||||
#undef HAVE_INET_NETOF
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa' function. */
|
||||
#undef HAVE_INET_NTOA
|
||||
|
||||
@@ -259,9 +256,6 @@
|
||||
/* Define if you need inet_addr */
|
||||
#undef NEED_INET_ADDR
|
||||
|
||||
/* Define if you need inet_netof */
|
||||
#undef NEED_INET_NETOF
|
||||
|
||||
/* Define if you need inet_ntoa */
|
||||
#undef NEED_INET_NTOA
|
||||
|
||||
|
||||
@@ -157,28 +157,6 @@ char *inetntoa(char *in)
|
||||
|
||||
return buf;
|
||||
}
|
||||
#ifndef INET6
|
||||
#ifdef NEED_INET_NETOF
|
||||
/*
|
||||
** inet_netof -- return the net portion of an internet number
|
||||
** argv 11/90
|
||||
*/
|
||||
|
||||
int inet_netof(struct IN_ADDR in)
|
||||
{
|
||||
int addr = in.s_net;
|
||||
|
||||
if (addr & 0x80 == 0)
|
||||
return ((int)in.s_net);
|
||||
|
||||
if (addr & 0x40 == 0)
|
||||
return ((int)in.s_net * 256 + in.s_host);
|
||||
|
||||
return ((int)in.s_net * 256 + in.s_host * 256 + in.s_lh);
|
||||
}
|
||||
|
||||
#endif /* NEED_INET_NETOF */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* inetntop: return the : notation of a given IPv6 internet number.
|
||||
@@ -2258,19 +2236,6 @@ int inet_pton6(const char *src, unsigned char *dst)
|
||||
return (1);
|
||||
}
|
||||
|
||||
/** Finds out if an address is IPv6, returns 1 if so, otherwise 0 */
|
||||
int isipv6(struct IN_ADDR *addr)
|
||||
{
|
||||
#ifndef INET6
|
||||
return 0;
|
||||
#else
|
||||
static char compareme[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff }; /* First part of IPv4-in-IPv6 (::ffff) */
|
||||
|
||||
/* If memcmp returns non-zero it means it did not match, hence it is ipv6, otherwise it is ipv4 */
|
||||
return memcmp(addr, compareme, 12) ? 1 : 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Transforms an IPv4 address (assumed in network byte order) to inet6 (as ::ffff:a.b.c.d). */
|
||||
void inet4_to_inet6(const void *src_in, void *dst_in)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user