summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog25
-rw-r--r--src/dispextern.h6
-rw-r--r--src/font.h3
-rw-r--r--src/frame.c3
-rw-r--r--src/fringe.c3
-rw-r--r--src/ftxfont.c3
-rw-r--r--src/keyboard.c6
-rw-r--r--src/keyboard.h6
-rw-r--r--src/lisp.h2
-rw-r--r--src/menu.c3
-rw-r--r--src/menu.h6
-rw-r--r--src/process.c6
-rw-r--r--src/process.h4
-rw-r--r--src/term.c6
-rw-r--r--src/termhooks.h2
-rw-r--r--src/xdisp.c6
-rw-r--r--src/xfaces.c3
-rw-r--r--src/xmenu.c3
-rw-r--r--src/xterm.h2
19 files changed, 29 insertions, 69 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2cdaf494aad..72aaea5eeb6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,28 @@
+2014-06-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ If a C name must be extern on some platforms, make it extern on all.
+ * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
+ (load_color):
+ * font.h (ftxfont_driver) [HAVE_XFT]:
+ * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
+ * lisp.h (get_frame_param):
+ * menu.h (tty_menu_show):
+ * process.h (conv_sockaddr_to_lisp, catch_child_signal):
+ * termhooks.h (encode_terminal_code):
+ * xterm.h (x_menu_wait_for_event):
+ Always declare.
+ * frame.c (get_frame_param):
+ * fringe.c (max_used_fringe_bitmap):
+ * ftxfont.c (ftxfont_driver):
+ * keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
+ * menu.c (menu_items_inuse):
+ * process.c (conv_sockaddr_to_lisp, catch_child_signal):
+ * term.c (encode_terminal_code, tty_menu_show):
+ * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
+ * xfaces.c (load_color):
+ * xmenu.c (x_menu_wait_for_event):
+ Now always extern.
+
2014-06-08 Dmitry Antipov <dmantipov@yandex.ru>
Change object marking routines to minimize stack usage.
diff --git a/src/dispextern.h b/src/dispextern.h
index 8ccc3d35d8c..ee17b65deaa 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3163,9 +3163,7 @@ int default_line_pixel_height (struct window *);
int display_prop_intangible_p (Lisp_Object, Lisp_Object, ptrdiff_t, ptrdiff_t);
void resize_echo_area_exactly (void);
int resize_mini_window (struct window *, int);
-#if defined USE_TOOLKIT_SCROLL_BARS && !defined USE_GTK
void set_vertical_scroll_bar (struct window *);
-#endif
int try_window (Lisp_Object, struct text_pos, int);
void window_box (struct window *, enum glyph_row_area,
int *, int *, int *, int *);
@@ -3238,9 +3236,7 @@ extern void draw_phys_cursor_glyph (struct window *,
enum draw_glyphs_face);
extern void get_phys_cursor_geometry (struct window *, struct glyph_row *,
struct glyph *, int *, int *, int *);
-#if HAVE_NTGUI
extern void erase_phys_cursor (struct window *);
-#endif
extern void display_and_set_cursor (struct window *, bool, int, int, int, int);
extern void x_update_cursor (struct frame *, bool);
extern void x_clear_cursor (struct window *);
@@ -3354,10 +3350,8 @@ void update_face_from_frame_parameter (struct frame *, Lisp_Object,
Lisp_Object);
Lisp_Object tty_color_name (struct frame *, int);
void clear_face_cache (int);
-#ifdef MSDOS
unsigned long load_color (struct frame *, struct face *, Lisp_Object,
enum lface_attribute_index);
-#endif
char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object,
int *);
void prepare_face_for_display (struct frame *, struct face *);
diff --git a/src/font.h b/src/font.h
index e2e36460583..4a525573cc2 100644
--- a/src/font.h
+++ b/src/font.h
@@ -834,7 +834,8 @@ extern void syms_of_ftxfont (void);
extern Lisp_Object Qxft;
extern struct font_driver xftfont_driver;
extern void syms_of_xftfont (void);
-#elif defined HAVE_FREETYPE
+#endif
+#if defined HAVE_FREETYPE || defined HAVE_XFT
extern struct font_driver ftxfont_driver;
#endif
#ifdef HAVE_BDFFONT
diff --git a/src/frame.c b/src/frame.c
index 4575ac0553e..e75a74be938 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1965,9 +1965,6 @@ If there is no window system support, this function does nothing. */)
/* Return the value of frame parameter PROP in frame FRAME. */
#ifdef HAVE_WINDOW_SYSTEM
-#if !HAVE_NS && !HAVE_NTGUI
-static
-#endif
Lisp_Object
get_frame_param (register struct frame *frame, Lisp_Object prop)
{
diff --git a/src/fringe.c b/src/fringe.c
index 1eae6b18493..7256987bcc2 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -480,9 +480,6 @@ static struct fringe_bitmap **fringe_bitmaps;
static Lisp_Object *fringe_faces;
static int max_fringe_bitmaps;
-#ifndef HAVE_NS
-static
-#endif
int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS;
diff --git a/src/ftxfont.c b/src/ftxfont.c
index 9db7cbceb66..53f2616bb62 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -37,9 +37,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
static Lisp_Object Qftx;
-#if defined HAVE_XFT || !defined HAVE_FREETYPE
-static
-#endif
struct font_driver ftxfont_driver;
struct ftxfont_frame_data
diff --git a/src/keyboard.c b/src/keyboard.c
index 568c8203c7f..dcf89137a5c 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1286,9 +1286,6 @@ usage: (track-mouse BODY...) */)
If ignore_mouse_drag_p is non-zero, ignore (implicit) mouse movement
after resizing the tool-bar window. */
-#if !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS
-static
-#endif
bool ignore_mouse_drag_p;
static struct frame *
@@ -2085,9 +2082,6 @@ bind_polling_period (int n)
/* Apply the control modifier to CHARACTER. */
-#ifndef HAVE_NTGUI
-static
-#endif
int
make_ctrl_char (int c)
{
diff --git a/src/keyboard.h b/src/keyboard.h
index 8a72d03416f..da83b9b01ed 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -305,9 +305,7 @@ extern Lisp_Object menu_items;
/* If non-nil, means that the global vars defined here are already in use.
Used to detect cases where we try to re-enter this non-reentrant code. */
-#if defined USE_GTK || defined USE_MOTIF
extern Lisp_Object menu_items_inuse;
-#endif
/* Number of slots currently allocated in menu_items. */
extern int menu_items_allocated;
@@ -415,9 +413,7 @@ extern bool waiting_for_input;
happens. */
extern struct timespec *input_available_clear_time;
-#if defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS
extern bool ignore_mouse_drag_p;
-#endif
/* The primary selection. */
extern Lisp_Object QPRIMARY;
@@ -467,9 +463,7 @@ extern bool input_polling_used (void);
extern void clear_input_pending (void);
extern bool requeued_events_pending_p (void);
extern void bind_polling_period (int);
-#if HAVE_NTGUI
extern int make_ctrl_char (int) ATTRIBUTE_CONST;
-#endif
extern void stuff_buffered_input (Lisp_Object);
extern void clear_waiting_for_input (void);
extern void swallow_events (bool);
diff --git a/src/lisp.h b/src/lisp.h
index 6d397169e87..67bbfa7c9b9 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4127,9 +4127,7 @@ extern void set_frame_param (struct frame *, Lisp_Object, Lisp_Object);
extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object);
extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object);
extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object);
-#if HAVE_NS || HAVE_NTGUI
extern Lisp_Object get_frame_param (struct frame *, Lisp_Object);
-#endif
extern void frames_discard_buffer (Lisp_Object);
extern void syms_of_frame (void);
diff --git a/src/menu.c b/src/menu.c
index 552ce1f2818..96f53903201 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -66,9 +66,6 @@ Lisp_Object menu_items;
/* If non-nil, means that the global vars defined here are already in use.
Used to detect cases where we try to re-enter this non-reentrant code. */
-#if ! (defined USE_GTK || defined USE_MOTIF)
-static
-#endif
Lisp_Object menu_items_inuse;
/* Number of slots currently allocated in menu_items. */
diff --git a/src/menu.h b/src/menu.h
index 42038f54b67..643ff40fef8 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -64,14 +64,12 @@ extern Lisp_Object x_menu_show (struct frame *, int, int, int,
#ifdef HAVE_NTGUI
extern Lisp_Object w32_menu_show (struct frame *, int, int, int,
Lisp_Object, const char **);
-#ifdef WINDOWSNT
-extern Lisp_Object tty_menu_show (struct frame *, int, int, int,
- Lisp_Object, const char **);
-#endif
#endif
#ifdef HAVE_NS
extern Lisp_Object ns_menu_show (struct frame *, int, int, int,
Lisp_Object, const char **);
#endif
+extern Lisp_Object tty_menu_show (struct frame *, int, int, int,
+ Lisp_Object, const char **);
extern ptrdiff_t menu_item_width (const unsigned char *);
#endif /* MENU_H */
diff --git a/src/process.c b/src/process.c
index 7f9b5ac59d1..b8b8eaaee5b 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1957,9 +1957,6 @@ create_pty (Lisp_Object process)
/* Convert an internal struct sockaddr to a lisp object (vector or string).
The address family of sa is not included in the result. */
-#ifndef WINDOWSNT
-static
-#endif
Lisp_Object
conv_sockaddr_to_lisp (struct sockaddr *sa, int len)
{
@@ -7051,9 +7048,6 @@ integer or floating point values.
futz with the SIGCHLD handler, but before Emacs forks any children.
This function's caller should block SIGCHLD. */
-#ifndef NS_IMPL_GNUSTEP
-static
-#endif
void
catch_child_signal (void)
{
diff --git a/src/process.h b/src/process.h
index 9181139226d..273ad9267d6 100644
--- a/src/process.h
+++ b/src/process.h
@@ -225,9 +225,7 @@ extern Lisp_Object system_process_attributes (Lisp_Object);
extern void record_deleted_pid (pid_t, Lisp_Object);
struct sockaddr;
-#ifdef WINDOWSNT
extern Lisp_Object conv_sockaddr_to_lisp (struct sockaddr *, int);
-#endif
extern void hold_keyboard_input (void);
extern void unhold_keyboard_input (void);
extern bool kbd_on_hold_p (void);
@@ -238,9 +236,7 @@ extern void add_read_fd (int fd, fd_callback func, void *data);
extern void delete_read_fd (int fd);
extern void add_write_fd (int fd, fd_callback func, void *data);
extern void delete_write_fd (int fd);
-#ifdef NS_IMPL_GNUSTEP
extern void catch_child_signal (void);
-#endif
#ifdef WINDOWSNT
extern Lisp_Object network_interface_list (void);
diff --git a/src/term.c b/src/term.c
index 37a938e338d..642907979aa 100644
--- a/src/term.c
+++ b/src/term.c
@@ -527,9 +527,6 @@ static ptrdiff_t encode_terminal_dst_size;
Set CODING->produced to the byte-length of the resulting byte
sequence, and return a pointer to that byte sequence. */
-#ifndef DOS_NT
-static
-#endif
unsigned char *
encode_terminal_code (struct glyph *src, int src_len,
struct coding_system *coding)
@@ -3583,9 +3580,6 @@ tty_menu_new_item_coords (struct frame *f, int which, int *x, int *y)
}
/* WINDOWSNT uses this as menu_show_hook, see w32console.c. */
-#ifndef WINDOWSNT
-static
-#endif
Lisp_Object
tty_menu_show (struct frame *f, int x, int y, int menuflags,
Lisp_Object title, const char **error_name)
diff --git a/src/termhooks.h b/src/termhooks.h
index 7aef3ae619d..f9bf9d785b6 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -651,10 +651,8 @@ extern void delete_terminal (struct terminal *);
/* The initial terminal device, created by initial_term_init. */
extern struct terminal *initial_terminal;
-#ifdef DOS_NT
extern unsigned char *encode_terminal_code (struct glyph *, int,
struct coding_system *);
-#endif
#ifdef HAVE_GPM
extern void close_gpm (int gpm_fd);
diff --git a/src/xdisp.c b/src/xdisp.c
index fbe87ed847a..1b86ec7d9d3 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -15710,9 +15710,6 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
return rc;
}
-#if !defined USE_TOOLKIT_SCROLL_BARS || defined USE_GTK
-static
-#endif
void
set_vertical_scroll_bar (struct window *w)
{
@@ -27055,9 +27052,6 @@ draw_phys_cursor_glyph (struct window *w, struct glyph_row *row,
/* Erase the image of a cursor of window W from the screen. */
-#ifndef HAVE_NTGUI
-static
-#endif
void
erase_phys_cursor (struct window *w)
{
diff --git a/src/xfaces.c b/src/xfaces.c
index 4e599d0bd05..1d869d90ac3 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -1248,9 +1248,6 @@ load_color2 (struct frame *f, struct face *face, Lisp_Object name,
record that fact in flags of the face so that we don't try to free
these colors. */
-#ifndef MSDOS
-static
-#endif
unsigned long
load_color (struct frame *f, struct face *face, Lisp_Object name,
enum lface_attribute_index target_index)
diff --git a/src/xmenu.c b/src/xmenu.c
index 18793457dad..2d41350e737 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -208,9 +208,6 @@ x_menu_set_in_use (int in_use)
/* Wait for an X event to arrive or for a timer to expire. */
-#ifndef USE_MOTIF
-static
-#endif
void
x_menu_wait_for_event (void *data)
{
diff --git a/src/xterm.h b/src/xterm.h
index bd27c1b201b..9daa478c964 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1031,9 +1031,7 @@ extern Lisp_Object xw_popup_dialog (struct frame *, Lisp_Object, Lisp_Object);
#if defined USE_GTK || defined USE_MOTIF
extern void x_menu_set_in_use (int);
#endif
-#ifdef USE_MOTIF
extern void x_menu_wait_for_event (void *data);
-#endif
extern int popup_activated (void);
extern void initialize_frame_menubar (struct frame *);