Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-info: add Cygwin version information #5457

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/listconf.c
Original file line number Diff line number Diff line change
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