Cygwin version detection at run time

Eliot Moss
Fri Aug 14 14:11:00 GMT 2015

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:
Unsubscribe info:

More information about the Cygwin mailing list