mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +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:
1 parent
ed49f9ab77
commit
d762833a6b
12 files changed
+8
-252
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user