[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r100994: More undeclared function fix
From: |
Jan D |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r100994: More undeclared function fixes and add -Wimplicit-function-declaration. |
Date: |
Fri, 06 Aug 2010 13:28:59 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100994
committer: Jan D <address@hidden>
branch nick: trunk
timestamp: Fri 2010-08-06 13:28:59 +0200
message:
More undeclared function fixes and add -Wimplicit-function-declaration.
If a function returns Lisp_Object it must be declared, otherwise on a 64-bit
system, it will return just 32 bits (int).
* configure.in: Use -Wimplicit-function-declaration if compiler supports it.
* src/keyboard.h (poll_for_input_1): Unconditionally declare.
* src/xterm.h (x_get_focus_frame): Declare.
modified:
ChangeLog
configure
configure.in
src/ChangeLog
src/keyboard.h
src/xterm.h
=== modified file 'ChangeLog'
--- a/ChangeLog 2010-08-06 10:12:41 +0000
+++ b/ChangeLog 2010-08-06 11:28:59 +0000
@@ -1,6 +1,7 @@
2010-08-06 Jan Djärv <address@hidden>
* configure.in: Check for util.h.
+ Use -Wimplicit-function-declaration if compiler supports it.
2010-08-05 Eli Zaretskii <address@hidden>
=== modified file 'configure'
--- a/configure 2010-08-06 10:12:41 +0000
+++ b/configure 2010-08-06 11:28:59 +0000
@@ -4865,6 +4865,38 @@
unset has_option
unset SAVE_CFLAGS
+### Use -Wimplicit-function-declaration if the compiler supports it
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands
-Wimplicit-function-declaration" >&5
+$as_echo_n "checking whether gcc understands
-Wimplicit-function-declaration... " >&6; }
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wimplicit-function-declaration"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ has_option=yes
+else
+ has_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+if test $has_option = yes; then
+ C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
+$as_echo "$has_option" >&6; }
+CFLAGS="$SAVE_CFLAGS"
+unset has_option
+unset SAVE_CFLAGS
+
+
#### Some other nice autoconf tests.
=== modified file 'configure.in'
--- a/configure.in 2010-08-06 10:12:41 +0000
+++ b/configure.in 2010-08-06 11:28:59 +0000
@@ -770,6 +770,20 @@
CFLAGS="$SAVE_CFLAGS"
unset has_option
unset SAVE_CFLAGS
+
+### Use -Wimplicit-function-declaration if the compiler supports it
+AC_MSG_CHECKING([whether gcc understands -Wimplicit-function-declaration])
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wimplicit-function-declaration"
+AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
+if test $has_option = yes; then
+ C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH"
+fi
+AC_MSG_RESULT($has_option)
+CFLAGS="$SAVE_CFLAGS"
+unset has_option
+unset SAVE_CFLAGS
+
AC_SUBST(C_WARNINGS_SWITCH)
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-08-06 11:04:29 +0000
+++ b/src/ChangeLog 2010-08-06 11:28:59 +0000
@@ -1,5 +1,9 @@
2010-08-06 Jan Djärv <address@hidden>
+ * xterm.h (x_get_focus_frame): Declare.
+
+ * keyboard.h (poll_for_input_1): Unconditionally declare.
+
* nsterm.h (x_set_menu_bar_lines): Declare.
* window.c: Don't include menu.h, it depends on lots of other .h-files.
=== modified file 'src/keyboard.h'
--- a/src/keyboard.h 2010-08-05 23:15:24 +0000
+++ b/src/keyboard.h 2010-08-06 11:28:59 +0000
@@ -515,9 +515,7 @@
extern void kbd_buffer_store_event_hold (struct input_event *,
struct input_event *);
extern void kbd_buffer_unget_event (struct input_event *);
-#ifdef POLL_FOR_INPUT
extern void poll_for_input_1 (void);
-#endif
extern void show_help_echo (Lisp_Object, Lisp_Object, Lisp_Object,
Lisp_Object, int);
extern void gen_help_event (Lisp_Object, Lisp_Object, Lisp_Object,
=== modified file 'src/xterm.h'
--- a/src/xterm.h 2010-08-05 23:15:24 +0000
+++ b/src/xterm.h 2010-08-06 11:28:59 +0000
@@ -1058,6 +1058,7 @@
/* Defined in xfns.c */
extern struct x_display_info * check_x_display_info (Lisp_Object frame);
+extern Lisp_Object x_get_focus_frame (struct frame *);
#ifdef USE_GTK
extern int xg_set_icon (struct frame *, Lisp_Object);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r100994: More undeclared function fixes and add -Wimplicit-function-declaration.,
Jan D <=