unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Minor src/xmenu.c change for older GCC versions
@ 2006-11-03 21:50 Giorgos Keramidas
  2006-11-04  3:21 ` Chong Yidong
  0 siblings, 1 reply; 7+ messages in thread
From: Giorgos Keramidas @ 2006-11-03 21:50 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-11-05 17:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-03 21:50 Minor src/xmenu.c change for older GCC versions Giorgos Keramidas
2006-11-04  3:21 ` Chong Yidong
2006-11-05  7:07   ` Richard Stallman
2006-11-05  8:00     ` Giorgos Keramidas
2006-11-05 12:06       ` Eli Zaretskii
2006-11-05 13:18         ` Giorgos Keramidas
2006-11-05 17:31     ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).