Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2021-01-26 21:12:48 +0300
committerSimon Tatham <anakin@pobox.com>2021-01-26 21:12:48 +0300
commitd851df486f066b37078fde6e99e775fa0b34fa02 (patch)
tree206850c9c919f614bba42c13bf7108e778506de8
parentaef7640bbae92e6d323f081e54828be654d332e9 (diff)
Fix build failure at -DNOT_X_WINDOWS.
I had been indecisive about whether the definitions and calls of store_cutbuffer and retrieve_cutbuffer should be compiled out completely in GTK-without-X mode, or whether the definitions should be left in as stubs and the calls still present. retrieve_cutbuffer ended up with a definition but no call in that mode. It was only an unused-function warning, but -Werror promoted it to an error. Fixed by making up my mind: now the functions are completely absent, and so are the calls to them.
-rw-r--r--CHECKLST.txt1
-rw-r--r--unix/gtkwin.c11
2 files changed, 7 insertions, 5 deletions
diff --git a/CHECKLST.txt b/CHECKLST.txt
index d3e6a0f5..5e9a7a08 100644
--- a/CHECKLST.txt
+++ b/CHECKLST.txt
@@ -115,6 +115,7 @@ Making a release candidate build
+ on at least a reasonably current stable Linux distro, and
also try Debian sid
+ test-build with all of GTK 1, 2 and 3
+ + test-build with -DNOT_X_WINDOWS
* feed the release-candidate source to Coverity and make sure it
didn't turn up any last-minute problems
* make sure we have a clean run of sctest
diff --git a/unix/gtkwin.c b/unix/gtkwin.c
index a375cb30..b2196107 100644
--- a/unix/gtkwin.c
+++ b/unix/gtkwin.c
@@ -2880,16 +2880,16 @@ static void gtkwin_clip_request_paste(TermWin *tw, int clipboard)
* GtkTargetList.) But that work can wait until there's a need for it!
*/
+#ifndef NOT_X_WINDOWS
+
/* Store the data in a cut-buffer. */
static void store_cutbuffer(GtkFrontend *inst, char *ptr, int len)
{
-#ifndef NOT_X_WINDOWS
if (inst->disp) {
/* ICCCM says we must rotate the buffers before storing to buffer 0. */
XRotateBuffers(inst->disp, 1);
XStoreBytes(inst->disp, ptr, len);
}
-#endif
}
/* Retrieve data from a cut-buffer.
@@ -2897,7 +2897,6 @@ static void store_cutbuffer(GtkFrontend *inst, char *ptr, int len)
*/
static char *retrieve_cutbuffer(GtkFrontend *inst, int *nbytes)
{
-#ifndef NOT_X_WINDOWS
char *ptr;
if (!inst->disp) {
*nbytes = 0;
@@ -2909,12 +2908,12 @@ static char *retrieve_cutbuffer(GtkFrontend *inst, int *nbytes)
ptr = 0;
}
return ptr;
-#else
*nbytes = 0;
return NULL;
-#endif
}
+#endif /* NOT_X_WINDOWS */
+
static void gtkwin_clip_write(
TermWin *tw, int clipboard, wchar_t *data, int *attr,
truecolour *truecolour, int len, bool must_deselect)
@@ -2995,9 +2994,11 @@ static void gtkwin_clip_write(
sresize(state->pasteout_data, state->pasteout_data_len, char);
}
+#ifndef NOT_X_WINDOWS
/* The legacy X cut buffers go with PRIMARY, not any other clipboard */
if (state->atom == GDK_SELECTION_PRIMARY)
store_cutbuffer(inst, state->pasteout_data, state->pasteout_data_len);
+#endif
if (gtk_selection_owner_set(inst->area, state->atom,
inst->input_event_time)) {