mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-05 09:25:49 +08:00
Builds: no Solaris makefile, no generic Unix makefile, no gethostbyname()
Names are resolved with getaddrinfo(), thread-safe everywhere: what was left of gethostbyname() (my_gethostbyname() over gethostbyname_r(), in its glibc and Solaris forms, GETHOSTBYNAME_R, the mutex for the plain one) served only the IPv4-only resolver already gone. Makefile.Solaris (Sun's compiler, _SOLARIS) and Makefile.unix go: CMake builds for the other systems; the documents say so, and their examples use Makefile.FreeBSD. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ed49f9ab77
commit
d762833a6b
@ -174,7 +174,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Linux-specific configuration
|
||||
add_compile_definitions(
|
||||
_GNU_SOURCE
|
||||
GETHOSTBYNAME_R
|
||||
_THREAD_SAFE
|
||||
_REENTRANT
|
||||
)
|
||||
|
||||
@ -14,7 +14,7 @@ CRYPT_PREFIX ?= $(PREFIX)
|
||||
CC ?= gcc
|
||||
|
||||
CFLAGS ?= -O3 -flto
|
||||
CFLAGS += -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DWITH_NETFILTER -D WITH_UN
|
||||
CFLAGS += -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -D_THREAD_SAFE -D_REENTRANT -DWITH_NETFILTER -D WITH_UN
|
||||
COUT = -o
|
||||
LN ?= ${CC}
|
||||
DCFLAGS ?= -fPIC
|
||||
|
||||
@ -1,72 +0,0 @@
|
||||
#
|
||||
# 3 proxy Makefile for Solaris/SunCC
|
||||
#
|
||||
#
|
||||
# add -DWITH_ODBC to CFLAGS and -lodbc to LDFLAGS to compile with ODBC
|
||||
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
PREFIX ?= 3proxy_
|
||||
CRYPT_PREFIX ?= $(PREFIX)
|
||||
CC ?= cc
|
||||
CFLAGS = -xO3 -c -D_SOLARIS -D_THREAD_SAFE -DGETHOSTBYNAME_R -D_REENTRANT
|
||||
COUT = -o ./
|
||||
LN = $(CC)
|
||||
LDFLAGS = -xO3
|
||||
DCFLAGS = -fPIC
|
||||
MAILPROXY ?= false
|
||||
ifeq ($(MAILPROXY),true)
|
||||
CFLAGS += -DWITH_POP3P -DWITH_IMAPP -DWITH_SMTPP
|
||||
MAIL_EXES = $(BUILDDIR)$(PREFIX)pop3p$(EXESUFFICS) $(BUILDDIR)$(PREFIX)imapp$(EXESUFFICS) $(BUILDDIR)$(PREFIX)smtpp$(EXESUFFICS)
|
||||
endif
|
||||
FTP ?= false
|
||||
ifeq ($(FTP),true)
|
||||
CFLAGS += -DWITH_FTP
|
||||
FTP_EXES = $(BUILDDIR)$(PREFIX)ftppr$(EXESUFFICS)
|
||||
endif
|
||||
HTTPSRV ?= true
|
||||
ifeq ($(HTTPSRV),true)
|
||||
CFLAGS += -DWITH_HTTPSRV
|
||||
HTTPSRV_OBJS = srvhttpsrv$(OBJSUFFICS) srvwebadmin$(OBJSUFFICS)
|
||||
endif
|
||||
DLFLAGS = -shared
|
||||
DLSUFFICS = .ld.so
|
||||
LIBS = -lpthread -lsocket -lnsl -lresolv -ldl
|
||||
LIBSPREFIX = -l
|
||||
LIBSSUFFIX =
|
||||
LNOUT = -o ./
|
||||
EXESUFFICS =
|
||||
OBJSUFFICS = .o
|
||||
DEFINEOPTION = -D
|
||||
COMPFILES = *~
|
||||
REMOVECOMMAND = rm -f
|
||||
AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
|
||||
TYPECOMMAND = cat
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.Solaris
|
||||
PLUGINS = StringsPlugin TrafficPlugin FilePlugin
|
||||
|
||||
WOLFSSL_CHECK = $(shell printf "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testwssl testwssl.o -lwolfssl 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
|
||||
ifeq ($(WOLFSSL_CHECK), true)
|
||||
LIBS += -lwolfssl
|
||||
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
|
||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||
else
|
||||
OPENSSL_CHECK = $(shell printf "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testssl testssl.o -lcrypto -lssl 2>/dev/null && rm testssl testssl.o && echo true||echo false)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
LIBS += -l crypto -l ssl
|
||||
CFLAGS += -DWITH_SSL
|
||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||
endif
|
||||
endif
|
||||
PCRE_CHECK = $(shell printf "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) -Wl,-Bstatic -lpcre2-8 -Wl,-Bdynamic 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
|
||||
ifeq ($(PCRE_CHECK), true)
|
||||
CFLAGS += -DWITH_PCRE
|
||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||
PCRE_LIBS = -Wl,-Bstatic -lpcre2-8 -Wl,-Bdynamic
|
||||
endif
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
allplugins:
|
||||
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
|
||||
144
Makefile.unix
144
Makefile.unix
@ -1,144 +0,0 @@
|
||||
#
|
||||
# 3 proxy Makefile for GCC/Unix
|
||||
#
|
||||
#
|
||||
# add -DWITH_ODBC to CFLAGS and -lodbc to LDFLAGS to compile with ODBC
|
||||
# library support. Add -DSAFESQL for poorely written ODBC library / drivers.
|
||||
|
||||
BUILDDIR = ../bin/
|
||||
PREFIX ?= 3proxy_
|
||||
CRYPT_PREFIX ?= $(PREFIX)
|
||||
MANDIR ?= /usr/share/man
|
||||
CC ?= gcc
|
||||
|
||||
# you may need -L/usr/pkg/lib for older NetBSD versions
|
||||
CFLAGS ?= -O3 -flto
|
||||
CFLAGS += -fno-strict-aliasing -c -pthread -D_THREAD_SAFE -D_REENTRANT -DWITH_UN
|
||||
COUT = -o
|
||||
LN ?= $(CC)
|
||||
LDFLAGS ?= -O3 -flto
|
||||
LDFLAGS += -pthread -fno-strict-aliasing
|
||||
# Use EXTRA_CFLAGS/EXTRA_LDFLAGS to add flags from the make command line.
|
||||
# Setting CFLAGS or LDFLAGS there instead overrides every assignment in this
|
||||
# makefile, including the += above and the STATIC/LIBSTATIC handling below.
|
||||
CFLAGS += $(EXTRA_CFLAGS)
|
||||
LDFLAGS += $(EXTRA_LDFLAGS)
|
||||
# -lpthreads may be reuqired on some platforms instead of -pthreads
|
||||
# -ldl or -lld may be required for some platforms
|
||||
DCFLAGS ?= -fPIC
|
||||
MAILPROXY ?= false
|
||||
ifeq ($(MAILPROXY),true)
|
||||
CFLAGS += -DWITH_POP3P -DWITH_IMAPP -DWITH_SMTPP
|
||||
MAIL_EXES = $(BUILDDIR)$(PREFIX)pop3p$(EXESUFFICS) $(BUILDDIR)$(PREFIX)imapp$(EXESUFFICS) $(BUILDDIR)$(PREFIX)smtpp$(EXESUFFICS)
|
||||
endif
|
||||
FTP ?= false
|
||||
ifeq ($(FTP),true)
|
||||
CFLAGS += -DWITH_FTP
|
||||
FTP_EXES = $(BUILDDIR)$(PREFIX)ftppr$(EXESUFFICS)
|
||||
endif
|
||||
HTTPSRV ?= true
|
||||
ifeq ($(HTTPSRV),true)
|
||||
CFLAGS += -DWITH_HTTPSRV
|
||||
HTTPSRV_OBJS = srvhttpsrv$(OBJSUFFICS) srvwebadmin$(OBJSUFFICS)
|
||||
endif
|
||||
DLFLAGS ?= -shared
|
||||
DLSUFFICS ?= .ld.so
|
||||
LIBS ?=
|
||||
LIBSPREFIX ?= -l
|
||||
LIBSSUFFIX ?=
|
||||
LNOUT = -o
|
||||
EXESUFFICS =
|
||||
OBJSUFFICS = .o
|
||||
DEFINEOPTION = -D
|
||||
COMPFILES = *~
|
||||
REMOVECOMMAND = rm -f
|
||||
AFTERCLEAN = (find . -type f -name "*.o" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true
|
||||
TYPECOMMAND = cat
|
||||
COMPATLIBS =
|
||||
MAKEFILE = Makefile.unix
|
||||
PLUGINS ?= StringsPlugin TrafficPlugin FilePlugin
|
||||
|
||||
# Transparent proxying is not built here: this makefile is for the systems
|
||||
# without a redirection 3proxy can read the original destination from. Where
|
||||
# the platform has one - OpenBSD divert-to is the case that fits - uncomment:
|
||||
#CFLAGS += -DWITH_TRANSPARENT
|
||||
#TRANSPARENT_OBJS = transparent$(OBJSUFFICS)
|
||||
ifeq ($(STATIC), true)
|
||||
LDFLAGS += -static
|
||||
CFLAGS += -DNOPLUGINS -DNOSTDRESOLVE -DNOCRYPT
|
||||
ZLIB = -lz -lzstd
|
||||
PLUGINS =
|
||||
PAM_CHECK = false
|
||||
endif
|
||||
ifeq ($(LIBSTATIC), true)
|
||||
STATIC_PREFIX = -Wl,-Bstatic
|
||||
STATIC_SUFFIX = -Wl,-Bdynamic
|
||||
ZLIB = -lz -lzstd
|
||||
endif
|
||||
WOLFSSL_CHECK ?= $(shell printf "\#include <wolfssl/options.h>\\n\#include <wolfssl/openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testwssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestwssl testwssl.o $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX) 2>/dev/null && rm testwssl testwssl.o && echo true||echo false)
|
||||
ifeq ($(WOLFSSL_CHECK), true)
|
||||
LIBS += $(STATIC_PREFIX) -lwolfssl $(STATIC_SUFFIX)
|
||||
CFLAGS += -DWITH_SSL -DWITH_WOLFSSL
|
||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||
ZLIB :=
|
||||
else
|
||||
OPENSSL_CHECK ?= $(shell printf "\#include <openssl/ssl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testssl.o - 2>/dev/null && $(CC) $(LDFLAGS) -otestssl testssl.o $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX) 2>/dev/null && rm testssl testssl.o && echo true||echo false)
|
||||
ifeq ($(OPENSSL_CHECK), true)
|
||||
LIBS += $(STATIC_PREFIX) $(ZLIB) -lcrypto -lssl $(STATIC_SUFFIX)
|
||||
CFLAGS += -DWITH_SSL
|
||||
SSL_OBJS = ssllib$(OBJSUFFICS) ssl$(OBJSUFFICS)
|
||||
else
|
||||
ZLIB :=
|
||||
endif
|
||||
endif
|
||||
PCRE_CHECK ?= $(shell printf "\#define PCRE2_CODE_UNIT_WIDTH 8\\n\#include <pcre2.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpcre.o - 2>/dev/null && $(CC) -o testpcre testpcre.o $(LDFLAGS) $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX) 2>/dev/null && rm testpcre testpcre.o && echo true||echo false)
|
||||
ifeq ($(PCRE_CHECK), true)
|
||||
CFLAGS += -DWITH_PCRE
|
||||
PCRE_OBJS = pcre$(OBJSUFFICS)
|
||||
PCRE_LIBS = $(STATIC_PREFIX) -lpcre2-8 $(STATIC_SUFFIX)
|
||||
endif
|
||||
PAM_CHECK ?= $(shell printf "\#include <security/pam_appl.h>\\n int main(){return 0;}" | tr -d \\\\ | $(CC) -x c $(CFLAGS) -o testpam.o - 2>/dev/null && $(CC) $(LDFLAGS) -o testpam testpam.o -lpam 2>/dev/null && rm testpam testpam.o && echo true||echo false)
|
||||
ifeq ($(PAM_CHECK), true)
|
||||
PLUGINS += PamAuth
|
||||
endif
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
DESTDIR ?=
|
||||
prefix ?= /usr/local
|
||||
BINPREFIX ?= $(prefix)/bin
|
||||
|
||||
install: all
|
||||
if [ ! -d "$(DESTDIR)$(BINPREFIX)" ]; then mkdir -p $(DESTDIR)$(BINPREFIX)/; fi
|
||||
install bin/3proxy $(DESTDIR)$(BINPREFIX)/3proxy
|
||||
install bin/$(CRYPT_PREFIX)crypt $(DESTDIR)$(BINPREFIX)/$(CRYPT_PREFIX)crypt
|
||||
for f in proxy socks pop3p imapp smtpp ftppr tcppm udppm tlspr; do \
|
||||
if [ -f bin/$(PREFIX)$$f ]; then install bin/$(PREFIX)$$f $(DESTDIR)$(BINPREFIX)/$(PREFIX)$$f; fi; \
|
||||
done
|
||||
install -d $(DESTDIR)$(prefix)/etc/3proxy/conf
|
||||
install -d $(DESTDIR)$(prefix)/etc/rc.d/
|
||||
sed -e 's|@CMAKE_INSTALL_FULL_BINDIR@|$(BINPREFIX)|g' -e 's|@CMAKE_INSTALL_FULL_SYSCONFDIR@|$(prefix)/etc|g' scripts/rc.d/3proxy.in > $(DESTDIR)$(prefix)/etc/rc.d/3proxy
|
||||
chmod 755 $(DESTDIR)$(prefix)/etc/rc.d/3proxy
|
||||
sed -e 's|@CMAKE_INSTALL_FULL_BINDIR@|$(BINPREFIX)|g' -e 's|@3PROXY_CONFDIR@|$(prefix)/etc/3proxy/conf|g' -e 's|@CRYPT_PREFIX@|$(CRYPT_PREFIX)|g' scripts/add3proxyuser.sh.in > $(DESTDIR)$(BINPREFIX)/add3proxyuser
|
||||
chmod 755 $(DESTDIR)$(BINPREFIX)/add3proxyuser
|
||||
if [ -s $(DESTDIR)$(prefix)/etc/3proxy/3proxy.cfg ]; then echo $(prefix)/etc/3proxy/3proxy.cfg already exists; else sed -e 's|@CMAKE_INSTALL_FULL_SYSCONFDIR@|$(prefix)/etc|g' -e 's|@3PROXY_CONFDIR@|$(prefix)/etc/3proxy/conf|g' -e 's|@3PROXY_COUNTERDIR@|/opt/3proxy|g' scripts/3proxy.cfg.in > $(DESTDIR)$(prefix)/etc/3proxy/3proxy.cfg; chmod 640 $(DESTDIR)$(prefix)/etc/3proxy/3proxy.cfg; fi
|
||||
if [ ! -d $(DESTDIR)/var/log/3proxy/ ]; then mkdir -p $(DESTDIR)/var/log/3proxy/; fi
|
||||
mkdir -p $(DESTDIR)/opt/3proxy
|
||||
touch $(DESTDIR)$(prefix)/etc/3proxy/conf/passwd
|
||||
touch $(DESTDIR)$(prefix)/etc/3proxy/conf/counters
|
||||
touch $(DESTDIR)$(prefix)/etc/3proxy/conf/bandlimiters
|
||||
install -d $(DESTDIR)$(MANDIR)/man8
|
||||
install -m 644 man/3proxy.8 $(DESTDIR)$(MANDIR)/man8/3proxy.8
|
||||
for f in proxy socks pop3p imapp smtpp ftppr tcppm udppm tlspr; do \
|
||||
if [ -f man/$$f.8 ] && [ -f bin/$(PREFIX)$$f ]; then install -m 644 man/$$f.8 $(DESTDIR)$(MANDIR)/man8/$(PREFIX)$$f.8; fi; \
|
||||
done
|
||||
install -m 644 man/3proxy_crypt.8 $(DESTDIR)$(MANDIR)/man8/$(CRYPT_PREFIX)crypt.8
|
||||
install -d $(DESTDIR)$(MANDIR)/man5
|
||||
install -m 644 man/3proxy.cfg.5 $(DESTDIR)$(MANDIR)/man5/3proxy.cfg.5
|
||||
@if [ "$(DESTDIR)" = "" ]; then \
|
||||
sh scripts/postinstall.sh $(prefix); \
|
||||
fi
|
||||
echo Run $(BINPREFIX)/add3proxyuser to add \'admin\' user
|
||||
|
||||
allplugins:
|
||||
@list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done
|
||||
@ -360,7 +360,6 @@ sudo launchctl unload /Library/LaunchDaemons/org.3proxy.3proxy.plist
|
||||
- Cygwin/gcc (cygwin.dll)
|
||||
- Unix/gcc
|
||||
- Unix/ccc
|
||||
- Solaris
|
||||
- Mac OS X, iPhone OS
|
||||
- Linux and derived systems
|
||||
- 32 bit and 64 bit versions for Windows Vista and above, Windows 2008 server and above
|
||||
|
||||
@ -114,9 +114,9 @@ For FreeBSD, use:
|
||||
ln -sf Makefile.FreeBSD Makefile
|
||||
make
|
||||
</pre>
|
||||
For other Unix-like systems, use Makefile.unix. On BSD-derived systems, make
|
||||
For other Unix-like systems, use CMake. On BSD-derived systems, make
|
||||
sure to use GNU make; sometimes it's called gmake instead of make.
|
||||
<br>Compilation is tested under FreeBSD, NetBSD, OpenBSD, Linux, Solaris, and macOS.
|
||||
<br>Compilation is tested under FreeBSD, NetBSD, OpenBSD, Linux, and macOS.
|
||||
<br>For ODBC support, install Unix ODBC libraries, remove -DNOODBC from the makefile,
|
||||
and add the ODBC library to the linker variable.
|
||||
<br>Binaries will be placed in the <code>bin/</code> directory.
|
||||
|
||||
@ -114,9 +114,9 @@
|
||||
<pre>
|
||||
ln -sf Makefile.FreeBSD Makefile
|
||||
make</pre>
|
||||
Для других Unix-подобных систем используйте Makefile.unix. На BSD-производных системах
|
||||
Для других Unix-подобных систем используйте CMake. На BSD-производных системах
|
||||
убедитесь, что используете GNU make; иногда он называется gmake вместо make.
|
||||
<br>Компиляция проверена на FreeBSD, NetBSD, OpenBSD, Linux, Solaris и macOS.
|
||||
<br>Компиляция проверена на FreeBSD, NetBSD, OpenBSD, Linux и macOS.
|
||||
<br>Для поддержки ODBC необходимо установить Unix ODBC, убрать -DNOODBC из флагов
|
||||
компиляции и добавить ODBC-библиотеку к флагам линковщика.
|
||||
<br>Исполняемые файлы будут помещены в каталог <code>bin/</code>.
|
||||
|
||||
@ -27,7 +27,7 @@ TCP & UDP маппинг портов;
|
||||
# wget http://3proxy.ru/current/3proxy.tgz
|
||||
# tar -xvzf 3proxy.tgz
|
||||
# cd 3proxy
|
||||
# make -f Makefile.unix
|
||||
# make -f Makefile.FreeBSD
|
||||
# mkdir /usr/local/3proxy
|
||||
# mkdir /usr/local/3proxy/logs
|
||||
# mkdir /usr/local/3proxy/stat
|
||||
|
||||
@ -88,7 +88,7 @@ l_descr)
|
||||
values ('%d-%m-%Y', '%H:%M:%S', '%U', '%N', %I, %O, '%T')"
|
||||
------------------------------------------
|
||||
|
||||
Cобрать 3proxy c поддрежкой iODBC, для этого в Makefile.unix поменять
|
||||
Cобрать 3proxy c поддрежкой iODBC, для этого в Makefile.FreeBSD поменять
|
||||
|
||||
CFLAGS = -Wall -O2 -c -pthread -D_THREAD_SAFE -D_REENTRANT -DWITH_STD_MALLOC -I/usr/local/include
|
||||
LIBS = -L /usr/local/lib -lodbc
|
||||
@ -96,5 +96,5 @@ LIBS = -L /usr/local/lib -lodbc
|
||||
и дать команды
|
||||
|
||||
make clean
|
||||
make -f Makefile.unix
|
||||
make -f Makefile.FreeBSD
|
||||
|
||||
|
||||
21
src/common.c
21
src/common.c
@ -951,27 +951,6 @@ static RESOLVFUNC moderesolver(int mode){
|
||||
}
|
||||
return resolvfunc;
|
||||
}
|
||||
#ifndef _WIN32
|
||||
_3proxy_mutex_t gethostbyname_mutex;
|
||||
int ghbn_init = 0;
|
||||
#endif
|
||||
|
||||
#ifndef NOSTDRESOLVE
|
||||
#ifdef GETHOSTBYNAME_R
|
||||
struct hostent * my_gethostbyname(char *name, char *buf, struct hostent *hp){
|
||||
struct hostent *result;
|
||||
int gherrno;
|
||||
|
||||
#ifdef _SOLARIS
|
||||
return gethostbyname_r(name, hp, buf, 1024, &gherrno);
|
||||
#else
|
||||
if(gethostbyname_r(name, hp, buf, 1024, &result, &gherrno) != 0)
|
||||
return NULL;
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
int afdetect(unsigned char *name){
|
||||
|
||||
@ -94,12 +94,8 @@ static int dobuf3(struct clientparam * param, unsigned char * buf, const unsigne
|
||||
#ifdef _WIN32
|
||||
ftime(&tb);
|
||||
timezone = tm->tm_isdst*60 - tb.timezone;
|
||||
#else
|
||||
#ifdef _SOLARIS
|
||||
timezone = -altzone / 60;
|
||||
#else
|
||||
timezone = tm->tm_gmtoff / 60;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
delay = param->time_start?((unsigned) ((sec - param->time_start))*1000 + msec) - param->msec_start : 0;
|
||||
|
||||
@ -399,7 +399,6 @@ int handleredirect(struct clientparam * param, struct ace * acentry);
|
||||
|
||||
int scanaddr(const unsigned char *s, uint32_t * ip, uint32_t * mask);
|
||||
int myinet_ntop(int af, void *src, char *dst, socklen_t size);
|
||||
uint32_t getip(unsigned char *name);
|
||||
uint32_t getip46(int family, unsigned char *name, struct sockaddr *sa);
|
||||
uint32_t getip46m(int mode, int family, unsigned char *name, struct sockaddr *sa);
|
||||
int afdetect(unsigned char *name);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user