X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:references:to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=QiyYLqVnbhF6q2mf uCv3vyGQC6p1KjefjG/SdbwW90Z/I512hDeTQ9OiUdu5kxVqiJk7WQuriXHVzyRX uCPEDRNc+N4w/Qh/BV3lDSk/WIxjEDRHRtLUTlMeIwNStl9qVTbu665is/HoLM0m gmzSUiTLhdSzoCfTaZmzbtgxOU0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:references:to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=LHxKholpFs4YtYP1Ur9eUH ZRWSs=; b=tahef7oGBFy/J2Dg6ZpIb5+uL+IEHCezTa+0EduvtgHWhtymS9LtNl MVSZWEZGVi112OA6ZofVA9AFkJdq6t/yKERa4kAKMuthGOiVFFTgn+PGr3VUvxK6 RjgwEPtFkwNRObmc0FlbDlMMVLJwivU1ZUwgUJp0axHXyGSiMIxZE= 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=BAYES_40,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: csmail.cs.umass.edu Reply-To: moss AT cs DOT umass DOT edu Subject: Re: Cygwin version detection at run time References: To: cygwin AT cygwin DOT com From: Eliot Moss Message-ID: <55CDF6F5.6030202@cs.umass.edu> Date: Fri, 14 Aug 2015 10:11:01 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes On 8/14/2015 9:56 AM, Václav Haisman wrote: > Hi. > > I am trying to find out Cygwin version at run time. > > I have noticed that there is `cygwin_internal (CW_GETVERSIONINFO)` API > for this. However, it seems that the `cygwin_version_info` structure > this call is supposed to fill in is not publicly available and is only > declared internally in `winsup/cygwin/cygwin_version.h`. > > Am I right that my only option is either to copy the internal > declaration of the structure or to use `/proc/version` and parse the > version string out of that? There's uname, whose options allow getting various parts of what /proc/version gives you. uname is also somewhat portable across different flavors of linux ... Eliot Moss -- 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