mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Unix buildinfo: stop saying 'GTK' in pure CLI utilities.
Unix PSCP, PSFTP, Plink and PuTTYgen now just report their build platform as '64-bit Unix' or '32-bit Unix', without mentioning irrelevant details of what flavour of GTK the other tools in the suite might have been built against. (In particular, they now won't imply anything outright untrue if there was no GTK present at build time at all!)
This commit is contained in:
parent
51732faeb9
commit
3f29d939ee
3
cmdgen.c
3
cmdgen.c
@ -227,6 +227,9 @@ static char *readpassphrase(const char *filename)
|
||||
|
||||
#define DEFAULT_RSADSA_BITS 2048
|
||||
|
||||
/* For Unix in particular, but harmless if this main() is reused elsewhere */
|
||||
const int buildinfo_gtk_relevant = FALSE;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char *infile = NULL;
|
||||
|
@ -6,6 +6,9 @@
|
||||
#include "putty.h"
|
||||
#include "terminal.h"
|
||||
|
||||
/* For Unix in particular, but harmless if this main() is reused elsewhere */
|
||||
const int buildinfo_gtk_relevant = FALSE;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char blk[512];
|
||||
|
3
testbn.c
3
testbn.c
@ -33,6 +33,9 @@ int random_byte(void)
|
||||
|
||||
#define fromxdigit(c) ( (c)>'9' ? ((c)&0xDF) - 'A' + 10 : (c) - '0' )
|
||||
|
||||
/* For Unix in particular, but harmless if this main() is reused elsewhere */
|
||||
const int buildinfo_gtk_relevant = FALSE;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char *buf;
|
||||
|
@ -127,6 +127,8 @@ https://wiki.gnome.org/Projects/GTK%2B/OSX/Bundling has some links.
|
||||
|
||||
char *x_get_default(const char *key) { return NULL; }
|
||||
|
||||
const int buildinfo_gtk_relevant = TRUE;
|
||||
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
/* This front end only works in GTK 3. If that's not what we've got,
|
||||
* it's easier to just turn this program into a trivial stub by ifdef
|
||||
|
@ -473,6 +473,8 @@ static int setup_gtk(const char *display)
|
||||
return ret;
|
||||
}
|
||||
|
||||
const int buildinfo_gtk_relevant = TRUE;
|
||||
|
||||
char *gtk_askpass_main(const char *display, const char *wintitle,
|
||||
const char *prompt, int *success)
|
||||
{
|
||||
|
@ -542,6 +542,8 @@ GtkWidget *make_gtk_toplevel_window(void *frontend)
|
||||
|
||||
extern int cfgbox(Conf *conf);
|
||||
|
||||
const int buildinfo_gtk_relevant = TRUE;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Conf *conf;
|
||||
|
14
unix/unix.h
14
unix/unix.h
@ -31,21 +31,29 @@
|
||||
#define JUST_USE_GTK_CLIPBOARD_UTF8 /* low-level gdk_selection_* fails */
|
||||
#define DEFAULT_CLIPBOARD GDK_SELECTION_CLIPBOARD /* OS X has no PRIMARY */
|
||||
|
||||
#define BUILDINFO_PLATFORM "OS X (GTK)"
|
||||
#define BUILDINFO_PLATFORM_GTK "OS X (GTK)"
|
||||
#define BUILDINFO_GTK
|
||||
|
||||
#elif defined NOT_X_WINDOWS
|
||||
|
||||
#define BUILDINFO_PLATFORM "Unix (pure GTK)"
|
||||
#define BUILDINFO_PLATFORM_GTK "Unix (pure GTK)"
|
||||
#define BUILDINFO_GTK
|
||||
|
||||
#else
|
||||
|
||||
#define BUILDINFO_PLATFORM "Unix (GTK + X11)"
|
||||
#define BUILDINFO_PLATFORM_GTK "Unix (GTK + X11)"
|
||||
#define BUILDINFO_GTK
|
||||
|
||||
#endif
|
||||
|
||||
/* BUILDINFO_PLATFORM varies its expansion between the GTK and
|
||||
* pure-CLI utilities, so that Unix Plink, PSFTP etc don't announce
|
||||
* themselves incongruously as having something to do with GTK. */
|
||||
#define BUILDINFO_PLATFORM_CLI "Unix"
|
||||
extern const int buildinfo_gtk_relevant;
|
||||
#define BUILDINFO_PLATFORM (buildinfo_gtk_relevant ? \
|
||||
BUILDINFO_PLATFORM_GTK : BUILDINFO_PLATFORM_CLI)
|
||||
|
||||
char *buildinfo_gtk_version(void);
|
||||
|
||||
struct Filename {
|
||||
|
@ -607,6 +607,8 @@ void frontend_net_error_pending(void) {}
|
||||
const int share_can_be_downstream = TRUE;
|
||||
const int share_can_be_upstream = TRUE;
|
||||
|
||||
const int buildinfo_gtk_relevant = FALSE;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int sending;
|
||||
|
@ -622,6 +622,8 @@ void frontend_net_error_pending(void) {}
|
||||
|
||||
void platform_psftp_pre_conn_setup(void) {}
|
||||
|
||||
const int buildinfo_gtk_relevant = FALSE;
|
||||
|
||||
/*
|
||||
* Main program: do platform-specific initialisation and then call
|
||||
* psftp_main().
|
||||
|
Loading…
Reference in New Issue
Block a user