emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r109326: Miscellaneous fixes for non-


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109326: Miscellaneous fixes for non-default X toolkits.
Date: Tue, 31 Jul 2012 15:37:38 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109326
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2012-07-31 15:37:38 +0400
message:
  Miscellaneous fixes for non-default X toolkits.
  * configure.ac (MOTIF): Check for /usr/include/openmotif
  and /usr/(lib|lib64)/openmotif if --with-x-toolkit=motif.
  * lwlib/lwlib-Xm.c (make_menu_in_widget): Remove unused variable.
  * src/xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
  * src/xterm.c (x_frame_of_widget): Remove redundant prototype.
  Move under #ifdef USE_LUCID.
  (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
  definition and usage to avoid warnings.
modified:
  ChangeLog
  configure.ac
  lwlib/ChangeLog
  lwlib/lwlib-Xm.c
  src/ChangeLog
  src/xfns.c
  src/xterm.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-07-31 07:58:08 +0000
+++ b/ChangeLog 2012-07-31 11:37:38 +0000
@@ -1,3 +1,9 @@
+2012-07-31  Dmitry Antipov  <address@hidden>
+
+       Improve OpenMotif detection on GNU/Linux systems.
+       * configure.ac (MOTIF): Check for /usr/include/openmotif
+       and /usr/(lib|lib64)/openmotif if --with-x-toolkit=motif.
+
 2012-07-31  Andreas Schwab  <address@hidden>
 
        * Makefile.in (install-arch-indep): Avoid eval.

=== modified file 'configure.ac'
--- a/configure.ac      2012-07-31 06:52:13 +0000
+++ b/configure.ac      2012-07-31 11:37:38 +0000
@@ -2139,7 +2139,21 @@
 
 LIBXP=
 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
-  AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1,
+  # OpenMotif may be installed in such a way on some GNU/Linux systems.
+  if test -d /usr/include/openmotif; then
+    CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
+    emacs_cv_openmotif=yes
+    case "$canonical" in
+      x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
+      test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
+      ;;
+      *)
+      test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
+    esac
+  else
+    emacs_cv_openmotif=no
+  fi
+  AC_CACHE_CHECK(for (Open)Motif version 2.1, emacs_cv_motif_version_2_1,
   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <Xm/Xm.h>]],
     [[#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
 int x = 5;
@@ -2149,6 +2163,9 @@
     emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)])
   if test $emacs_cv_motif_version_2_1 = yes; then
     AC_CHECK_LIB(Xp, XpCreateContext, LIBXP=-lXp)
+    if test x$emacs_cv_openmotif = xyes; then
+      REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
+    fi
   else
     AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif,
     # We put this in CFLAGS temporarily to precede other -I options

=== modified file 'lwlib/ChangeLog'
--- a/lwlib/ChangeLog   2012-07-14 02:08:32 +0000
+++ b/lwlib/ChangeLog   2012-07-31 11:37:38 +0000
@@ -1,3 +1,8 @@
+2012-07-31  Dmitry Antipov  <address@hidden>
+
+       Avoid unused variable warning if --with-x-toolkit=motif.
+       * lwlib-Xm.c (make_menu_in_widget): Remove unused variable.
+
 2012-07-06  Paul Eggert  <address@hidden>
 
        Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).

=== modified file 'lwlib/lwlib-Xm.c'
--- a/lwlib/lwlib-Xm.c  2012-06-26 01:05:39 +0000
+++ b/lwlib/lwlib-Xm.c  2012-07-31 11:37:38 +0000
@@ -490,7 +490,6 @@
   int child_index;
   widget_value* cur;
   Widget button = 0;
-  Widget title = 0;
   Widget menu;
   Arg al [256];
   int ac;
@@ -554,7 +553,7 @@
        {
          ac = 0;
          XtSetArg (al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++;
-         title = button = XmCreateLabel (widget, cur->name, al, ac);
+         button = XmCreateLabel (widget, cur->name, al, ac);
        }
       else if (lw_separator_p (cur->name, &separator, 1))
        {

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-07-31 07:42:43 +0000
+++ b/src/ChangeLog     2012-07-31 11:37:38 +0000
@@ -1,3 +1,12 @@
+2012-07-31  Dmitry Antipov  <address@hidden>
+
+       Miscellaneous fixes for non-default X toolkits.
+       * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
+       * xterm.c (x_frame_of_widget): Remove redundant prototype.
+       Move under #ifdef USE_LUCID.
+       (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
+       definition and usage to avoid warnings.
+
 2012-07-31  Jan Djärv  <address@hidden>
 
        * nsterm.m (openFiles): Fix previous checkin.

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2012-07-27 09:24:34 +0000
+++ b/src/xfns.c        2012-07-31 11:37:38 +0000
@@ -5382,7 +5382,7 @@
   /* Create the dialog with PROMPT as title, using DIR as initial
      directory and using "*" as pattern.  */
   dir = Fexpand_file_name (dir, Qnil);
-  dir_xmstring = XmStringCreateLocalized (SDATA (dir));
+  dir_xmstring = XmStringCreateLocalized (SSDATA (dir));
   pattern_xmstring = XmStringCreateLocalized ("*");
 
   XtSetArg (al[ac], XmNtitle, SDATA (prompt)); ++ac;
@@ -5435,12 +5435,12 @@
 
       XmTextPosition last_pos = XmTextFieldGetLastPosition (wtext);
       XmTextFieldReplace (wtext, 0, last_pos,
-                          (SDATA (Ffile_name_nondirectory 
(default_filename))));
+                          (SSDATA (Ffile_name_nondirectory 
(default_filename))));
 
       /* Select DEFAULT_FILENAME in the files list box.  DEFAULT_FILENAME
          must include the path for this to work.  */
 
-      default_xmstring = XmStringCreateLocalized (SDATA (default_filename));
+      default_xmstring = XmStringCreateLocalized (SSDATA (default_filename));
 
       if (XmListItemExists (list, default_xmstring))
         {

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2012-07-10 23:24:36 +0000
+++ b/src/xterm.c       2012-07-31 11:37:38 +0000
@@ -1438,12 +1438,12 @@
 
 #ifdef USE_X_TOOLKIT
 
-static struct frame *x_frame_of_widget (Widget);
 static Boolean cvt_string_to_pixel (Display *, XrmValue *, Cardinal *,
                                     XrmValue *, XrmValue *, XtPointer *);
 static void cvt_pixel_dtor (XtAppContext, XrmValue *, XtPointer,
                             XrmValue *, Cardinal *);
 
+#ifdef USE_LUCID
 
 /* Return the frame on which widget WIDGET is used.. Abort if frame
    cannot be determined.  */
@@ -1478,9 +1478,6 @@
   abort ();
 }
 
-
-#ifdef USE_LUCID
-
 /* Allocate a color which is lighter or darker than *PIXEL by FACTOR
    or DELTA.  Try a color with RGB values multiplied by FACTOR first.
    If this produces the same color as PIXEL, try a color where all RGB
@@ -1496,7 +1493,7 @@
   return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta);
 }
 
-#endif
+#endif /* USE_LUCID */
 
 
 /* Structure specifying which arguments should be passed by Xt to
@@ -4635,7 +4632,7 @@
   Widget widget;
   Arg av[20];
   int ac = 0;
-  char const *scroll_bar_name = SCROLL_BAR_NAME;
+  const char *scroll_bar_name = SCROLL_BAR_NAME;
   unsigned long pixel;
 
   BLOCK_INPUT;
@@ -4665,7 +4662,7 @@
     }
 
   widget = XmCreateScrollBar (f->output_data.x->edit_widget,
-                             scroll_bar_name, av, ac);
+                             (char *) scroll_bar_name, av, ac);
 
   /* Add one callback for everything that can happen.  */
   XtAddCallback (widget, XmNdecrementCallback, xm_scroll_callback,


reply via email to

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