emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Minor src/xmenu.c change for older GCC versions


From: Giorgos Keramidas
Subject: Minor src/xmenu.c change for older GCC versions
Date: Fri, 3 Nov 2006 23:50:38 +0200 (EET)

On FreeBSD 4.X we use GCC 2.95.4 20020320 [FreeBSD] as the system
compiler.  The src/xmenu.c source triggers an error when compiled with
this version of GCC, so we had to make the following local change
as part of the editors/emacs-devel port of Emacs 22.X to FreeBSD:

%%%
diff -r e9c18eba38ea -r 355e6a7d786b src/xmenu.c
--- a/src/xmenu.c       Fri Oct 27 15:45:51 2006 +0000
+++ b/src/xmenu.c       Sat Oct 28 01:49:45 2006 +0300
@@ -1395,9 +1395,10 @@ If FRAME is nil or not given, use the se
      Lisp_Object frame;
 {
   GtkWidget *menubar;
+  FRAME_PTR f;
+
   BLOCK_INPUT;
-  FRAME_PTR f = check_x_frame (frame);
-
+  f = check_x_frame (frame);
   if (FRAME_EXTERNAL_MENU_BAR (f))
     set_frame_menubar (f, 0, 1);
 
%%%

Apparently, gcc 2.95.4 does not accept the FRAME_PTR declaration *after*
BLOCK_INPUT, because it expects all declarations to come before
BLOCK_INPUT expands to executable parts.

Does this change look like something we can add to Emacs before pretest
gets released?  It's not really that intrusive, and it will reduce the
number of local patches we have to use to build Emacs 22.X on FreeBSD,
when it's officially released.

Regards,
Giorgos





reply via email to

[Prev in Thread] Current Thread [Next in Thread]