X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,TW_CP,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org X-Spam-Score: -99.959 Message-ID: <4BEFAAD3.7050002@sh.cvut.cz> Date: Sun, 16 May 2010 10:20:35 +0200 From: =?UTF-8?B?VsOhY2xhdiBIYWlzbWFu?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: getlong()/getshort()/ns_get16()/ns_get32() References: <4BEF8E88 DOT 2040103 AT conus DOT info> In-Reply-To: <4BEF8E88.2040103@conus.info> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Dennis Yurichev wrote, On 16.5.2010 8:19: > Hi. > > I have a software using getlong()/getshort() functions which are also > synonyms to ns_get32()/ns_get16(). > But they are removed from cygwin? > Why and what to use instead of? Wow. Having so badly named functions in public name space... You cold reimplement the missing functions like this: unsigned short _getshort(unsigned char *ptr) { unsigned short x; memcpy (&x, ptr, sizeof (x)); return x; // or return ntohs (x); if the data are in network byte order. } ... Actually, if you do grep over header files you will find that arpa/nameser.h contains ns_get32() etc. -- VH -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple