www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com> |
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, |
<http://sourceware.cygnus.com/ml/#faqs> | |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
From: | "Philippe Noel" <pnoel AT socoint DOT com> |
To: | "Cygwin-List" <cygwin AT sourceware DOT cygnus DOT com> |
Subject: | Problems with /etc/services & getservbyname() function |
Date: | Tue, 10 Aug 1999 11:24:51 -0400 |
Message-ID: | <000901bee344$7d66e850$400010ac@philippe.socoint.com> |
MIME-Version: | 1.0 |
X-Priority: | 3 (Normal) |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook 8.5, Build 4.71.2377.0 |
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3 |
Importance: | Normal |
Hi all, I'm currently trying to use the function "getservbyname" and I have problems with. I do not find any hints on the mailing-list archive nor in the FAQ, but I saw the function is supported by Cygwin. The getservbyname() function returns a servent structure for the line from /etc/services that matches the service name using protocol proto. I installed the file /etc/services like it is on my Linux system. Actually, this functions always returns me a NULL pointer. Does anybody uses this function in his source code without having problems? Is there anything special about /etc/services? Here is an example of what I am doing: ---- /etc/services content -------------------------------- socorfs 3379/tcp ----------------------------------------------------------- ---- Source code ------------------------------------------ struct servent *serv = getservbyname( "socorfs", "tcp" ); if( serv == NULL ) return 0; ----------------------------------------------------------- And the function getservbyname() always return NULL... Additionnal informations. Here is how I mount my Cygwin root directory: Device Directory Type Flags D:\Cygwin-root / native text!=binary P H I L I P P E N O E L Socomar International (1995) inc. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |