From 34c6b847fbad20b026ee878f6c3b97ab481f6a92 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Mon, 28 Jul 2014 12:07:55 +0400 Subject: [PATCH] Fix --without-x build and pacify --enable-gcc-warnings. Problems reported in Bug#18122 and Bug#18124. * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM. (frame_windows_min_size): Now static. * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]: Define as no-op. (adjust_frame_size): Always declare prototype. --- src/ChangeLog | 8 ++++++++ src/frame.c | 7 ++----- src/frame.h | 6 ++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7edd4f329b0..f74a46c4ad2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -23,6 +23,14 @@ * lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise. * process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function. + Fix --without-x build and pacify --enable-gcc-warnings. + Problems reported in Bug#18122 and Bug#18124. + * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM. + (frame_windows_min_size): Now static. + * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]: + Define as no-op. + (adjust_frame_size): Always declare prototype. + 2014-07-28 Paul Eggert * frame.c (x_set_frame_parameters): Don't use uninitialized locals. diff --git a/src/frame.c b/src/frame.c index d32aa0368f0..cc0d77e54c8 100644 --- a/src/frame.c +++ b/src/frame.c @@ -194,9 +194,8 @@ check_window_system (struct frame *f) : "Window system is not in use or not initialized"); } - /* Return the value of frame parameter PROP in frame FRAME. */ -#ifdef HAVE_WINDOW_SYSTEM + Lisp_Object get_frame_param (register struct frame *frame, Lisp_Object prop) { @@ -207,8 +206,6 @@ get_frame_param (register struct frame *frame, Lisp_Object prop) return tem; return Fcdr (tem); } -#endif - /* Return 1 if `frame-inhibit-implied-resize' is non-nil or fullscreen state of frame F would be affected by a vertical (horizontal if @@ -367,7 +364,7 @@ predicates which report frame's specific UI-related capabilities. */) return type; } -int +static int frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, Lisp_Object pixelwise) { return XINT (call3 (Qframe_windows_min_size, frame, horizontal, pixelwise)); diff --git a/src/frame.h b/src/frame.h index fde815c3b84..51597c4bcdb 100644 --- a/src/frame.h +++ b/src/frame.h @@ -866,6 +866,7 @@ default_pixels_per_inch_y (void) #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) ((void) f, 0) #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT(f) ((void) f, 0) #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) ((void) f, 0) +#define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) ((void) f, 0) #endif /* HAVE_WINDOW_SYSTEM */ @@ -1108,6 +1109,7 @@ extern void frame_make_pointer_invisible (struct frame *); extern void frame_make_pointer_visible (struct frame *); extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object); extern bool frame_inhibit_resize (struct frame *, bool); +extern void adjust_frame_size (struct frame *, int, int, int, bool); extern Lisp_Object Vframe_list; @@ -1376,10 +1378,6 @@ extern Lisp_Object Qrun_hook_with_args; /* The class of this X application. */ #define EMACS_CLASS "Emacs" -/* If these are not in frame.c they are in xterm.c, w32term.c, etc. */ -extern void adjust_frame_size (struct frame *, int, int, int, bool); -extern int frame_windows_min_size (Lisp_Object, Lisp_Object, Lisp_Object); - extern void x_set_scroll_bar_default_width (struct frame *); extern void x_set_scroll_bar_default_height (struct frame *); extern void x_set_offset (struct frame *, int, int, int); -- 2.39.2