comparison src/process-unix.c @ 4834:b3ea9c582280

Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
author Ben Wing <ben@xemacs.org>
date Tue, 12 Jan 2010 01:38:04 -0600
parents aa5ed11f473b
children 19a72041c5ed
comparison
equal deleted inserted replaced
4833:4dd2389173fc 4834:b3ea9c582280
523 struct servent *svc_info; 523 struct servent *svc_info;
524 Extbyte *tailportext; 524 Extbyte *tailportext;
525 525
526 CHECK_STRING (tail_port); 526 CHECK_STRING (tail_port);
527 TO_EXTERNAL_FORMAT (LISP_STRING, tail_port, C_STRING_ALLOCA, 527 TO_EXTERNAL_FORMAT (LISP_STRING, tail_port, C_STRING_ALLOCA,
528 tailportext, Qnative); 528 tailportext, Qunix_service_name_encoding);
529 529
530 svc_info = getservbyname (tailportext, proto); 530 svc_info = getservbyname (tailportext, proto);
531 if ((svc_info != 0) && (svc_info->s_port == port)) 531 if ((svc_info != 0) && (svc_info->s_port == port))
532 break; 532 break;
533 else 533 else
1814 #else 1814 #else
1815 hints.ai_family = PF_INET; 1815 hints.ai_family = PF_INET;
1816 #endif 1816 #endif
1817 hints.ai_socktype = SOCK_STREAM; 1817 hints.ai_socktype = SOCK_STREAM;
1818 hints.ai_protocol = 0; 1818 hints.ai_protocol = 0;
1819 LISP_STRING_TO_EXTERNAL (host, ext_host, Qnative); 1819 LISP_STRING_TO_EXTERNAL (host, ext_host, Qunix_host_name_encoding);
1820 retval = getaddrinfo (ext_host, NULL, &hints, &res); 1820 retval = getaddrinfo (ext_host, NULL, &hints, &res);
1821 if (retval != 0) 1821 if (retval != 0)
1822 { 1822 {
1823 CIbyte *gai_err; 1823 CIbyte *gai_err;
1824 1824
1831 else 1831 else
1832 { 1832 {
1833 int gni = getnameinfo (res->ai_addr, res->ai_addrlen, 1833 int gni = getnameinfo (res->ai_addr, res->ai_addrlen,
1834 addrbuf, sizeof(addrbuf), 1834 addrbuf, sizeof(addrbuf),
1835 NULL, 0, NI_NUMERICHOST); 1835 NULL, 0, NI_NUMERICHOST);
1836 canonname = gni ? host : build_ext_string (addrbuf, Qnative); 1836 canonname = gni ? host : build_ext_string (addrbuf,
1837 Qunix_host_name_encoding);
1837 1838
1838 freeaddrinfo (res); 1839 freeaddrinfo (res);
1839 } 1840 }
1840 1841
1841 return canonname; 1842 return canonname;