Mercurial > pidgin.yaz
comparison src/proxy.c @ 7475:08ce2a94d9c7
[gaim-migrate @ 8088]
I made Gaim compile with -ansi in my CFLAGS... I don't really know why.
I had to set HAVE_GETADDRINFO and HAVE_SIGNAL_H to 0
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 11 Nov 2003 07:08:13 +0000 |
parents | db6bd3e794d8 |
children | ac6b2b3a9a1f |
comparison
equal
deleted
inserted
replaced
7474:2bdacd38528c | 7475:08ce2a94d9c7 |
---|---|
382 | 382 |
383 rc=read(req->fd_out, &err, sizeof(err)); | 383 rc=read(req->fd_out, &err, sizeof(err)); |
384 if((rc==4) && (err!=0)) { | 384 if((rc==4) && (err!=0)) { |
385 char message[1024]; | 385 char message[1024]; |
386 g_snprintf(message, sizeof(message), "DNS error: %s (pid=%d)", | 386 g_snprintf(message, sizeof(message), "DNS error: %s (pid=%d)", |
387 #ifdef HAVE_GETADDRINFO | 387 #if HAVE_GETADDRINFO |
388 gai_strerror(err), | 388 gai_strerror(err), |
389 #else | 389 #else |
390 hstrerror(err), | 390 hstrerror(err), |
391 #endif | 391 #endif |
392 req->dns_pid); | 392 req->dns_pid); |
533 req->dns_pid=fork(); | 533 req->dns_pid=fork(); |
534 if(req->dns_pid==0) { | 534 if(req->dns_pid==0) { |
535 const int zero = 0; | 535 const int zero = 0; |
536 int rc; | 536 int rc; |
537 | 537 |
538 #ifdef HAVE_GETADDRINFO | 538 #if HAVE_GETADDRINFO |
539 struct addrinfo hints, *res, *tmp; | 539 struct addrinfo hints, *res, *tmp; |
540 char servname[20]; | 540 char servname[20]; |
541 #else | 541 #else |
542 struct sockaddr_in sin; | 542 struct sockaddr_in sin; |
543 const socklen_t addrlen = sizeof(sin); | 543 const socklen_t addrlen = sizeof(sin); |
583 _exit(1); | 583 _exit(1); |
584 } | 584 } |
585 write(child_out[1], &Y, 1); | 585 write(child_out[1], &Y, 1); |
586 } | 586 } |
587 | 587 |
588 #ifdef HAVE_GETADDRINFO | 588 #if HAVE_GETADDRINFO |
589 g_snprintf(servname, sizeof(servname), "%d", dns_params.port); | 589 g_snprintf(servname, sizeof(servname), "%d", dns_params.port); |
590 memset(&hints,0,sizeof(hints)); | 590 memset(&hints,0,sizeof(hints)); |
591 | 591 |
592 /* This is only used to convert a service | 592 /* This is only used to convert a service |
593 * name to a port number. As we know we are | 593 * name to a port number. As we know we are |