delorie.com/archives/browse.cgi | search |
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?= <v DOT haisman AT sh DOT cvut DOT cz> |
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> |
X-IsSubscribed: | yes |
Reply-To: | cygwin AT cygwin DOT com |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |