mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 09:27:59 +00:00
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.
This commit is contained in:
parent
aef7640bba
commit
d851df486f
@ -115,6 +115,7 @@ Making a release candidate build
|
|||||||
+ on at least a reasonably current stable Linux distro, and
|
+ on at least a reasonably current stable Linux distro, and
|
||||||
also try Debian sid
|
also try Debian sid
|
||||||
+ test-build with all of GTK 1, 2 and 3
|
+ 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
|
* feed the release-candidate source to Coverity and make sure it
|
||||||
didn't turn up any last-minute problems
|
didn't turn up any last-minute problems
|
||||||
* make sure we have a clean run of sctest
|
* make sure we have a clean run of sctest
|
||||||
|
@ -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!
|
* GtkTargetList.) But that work can wait until there's a need for it!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef NOT_X_WINDOWS
|
||||||
|
|
||||||
/* Store the data in a cut-buffer. */
|
/* Store the data in a cut-buffer. */
|
||||||
static void store_cutbuffer(GtkFrontend *inst, char *ptr, int len)
|
static void store_cutbuffer(GtkFrontend *inst, char *ptr, int len)
|
||||||
{
|
{
|
||||||
#ifndef NOT_X_WINDOWS
|
|
||||||
if (inst->disp) {
|
if (inst->disp) {
|
||||||
/* ICCCM says we must rotate the buffers before storing to buffer 0. */
|
/* ICCCM says we must rotate the buffers before storing to buffer 0. */
|
||||||
XRotateBuffers(inst->disp, 1);
|
XRotateBuffers(inst->disp, 1);
|
||||||
XStoreBytes(inst->disp, ptr, len);
|
XStoreBytes(inst->disp, ptr, len);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Retrieve data from a cut-buffer.
|
/* 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)
|
static char *retrieve_cutbuffer(GtkFrontend *inst, int *nbytes)
|
||||||
{
|
{
|
||||||
#ifndef NOT_X_WINDOWS
|
|
||||||
char *ptr;
|
char *ptr;
|
||||||
if (!inst->disp) {
|
if (!inst->disp) {
|
||||||
*nbytes = 0;
|
*nbytes = 0;
|
||||||
@ -2909,12 +2908,12 @@ static char *retrieve_cutbuffer(GtkFrontend *inst, int *nbytes)
|
|||||||
ptr = 0;
|
ptr = 0;
|
||||||
}
|
}
|
||||||
return ptr;
|
return ptr;
|
||||||
#else
|
|
||||||
*nbytes = 0;
|
*nbytes = 0;
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* NOT_X_WINDOWS */
|
||||||
|
|
||||||
static void gtkwin_clip_write(
|
static void gtkwin_clip_write(
|
||||||
TermWin *tw, int clipboard, wchar_t *data, int *attr,
|
TermWin *tw, int clipboard, wchar_t *data, int *attr,
|
||||||
truecolour *truecolour, int len, bool must_deselect)
|
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);
|
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 */
|
/* The legacy X cut buffers go with PRIMARY, not any other clipboard */
|
||||||
if (state->atom == GDK_SELECTION_PRIMARY)
|
if (state->atom == GDK_SELECTION_PRIMARY)
|
||||||
store_cutbuffer(inst, state->pasteout_data, state->pasteout_data_len);
|
store_cutbuffer(inst, state->pasteout_data, state->pasteout_data_len);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (gtk_selection_owner_set(inst->area, state->atom,
|
if (gtk_selection_owner_set(inst->area, state->atom,
|
||||||
inst->input_event_time)) {
|
inst->input_event_time)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user