Skip to content

Commit

Permalink
build-info: add Cygwin version information
Browse files Browse the repository at this point in the history
The recent version of Cygwin removed support for many old Windows
versions/platforms. Adding this information to the output can help
us detect if end users are complaining about unsupported things.

Signed-off-by: Claudio André <dev@claudioandre.slmail.me>
  • Loading branch information
claudioandre-br authored and solardiz committed Apr 1, 2024
1 parent 1794494 commit f9fedd2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/listconf.c
Expand Up @@ -100,6 +100,10 @@ extern char CPU_req_name[];

#define SINGLE_MAX_WORDS(len) MIN(SINGLE_IDX_MAX, SINGLE_BUF_MAX / len + 1)

#ifdef __CYGWIN__
#include <sys/utsname.h>
#endif

/*
* FIXME: Should all the listconf_list_*() functions get an additional stream
* parameter, so that they can write to stderr instead of stdout in case fo an
Expand Down Expand Up @@ -345,6 +349,17 @@ static void listconf_list_build_info(void)
printf("Terminal locale string: %s\n", john_terminal_locale);
printf("Parsed terminal locale: %s\n", cp_id2name(options.terminal_enc));

#ifdef __CYGWIN__
{
struct utsname buffer;

if (uname(&buffer) < 0)
printf("Cygwin version detection error\n");
else
printf("Cygwin version: %s, %s\n", buffer.release, buffer.version);
}
#endif

// OK, now append debugging options, BUT only output something if
// one or more of them is set. IF none set, be silent.
#if defined (DEBUG)
Expand Down

0 comments on commit f9fedd2

Please sign in to comment.