changeset 5091:ed624ab64583

fix compile errors/warnings -------------------- ChangeLog entries follow: -------------------- lib-src/ChangeLog addition: 2010-03-02 Ben Wing <ben@xemacs.org> * digest-doc.c: * make-path.c: `emacs' isn't defined, but HAVE_CONFIG_H is, so use it to get config.h. * getopt.h: Conditionalize on HAVE_CONFIG_H to get real prototypes. src/ChangeLog addition: 2010-03-02 Ben Wing <ben@xemacs.org> * Makefile.in.in: * Makefile.in.in (objs): glyphs-shared.o, glyphs-eimage.o only needed when HAVE_WINDOW_SYSTEM. glyphs-widget.o should be too, but we need a bit of work ifdeffing out the subwindow stuff from redisplay.c et al. * bytecode.c (init_opcode_table_multi_op): Change var name to avoid shadowing with `basename'. * emacs.c (main_1): Don't call init/etc. routines for glyphs-shared, glyphs-eimage unless HAVE_WINDOW_SYSTEM is defined. * linuxplay.c: * linuxplay.c (sighandler): * vdb-posix.c (vdb_fault_handler): Use const for variables holding string constants to avoid C++ warnings.
author Ben Wing <ben@xemacs.org>
date Tue, 02 Mar 2010 05:22:10 -0600
parents 88f955fa5a7f
children 3aa3888729c3
files lib-src/ChangeLog lib-src/digest-doc.c lib-src/getopt.h lib-src/make-path.c src/ChangeLog src/Makefile.in.in src/bytecode.c src/emacs.c src/linuxplay.c src/vdb-posix.c
diffstat 10 files changed, 50 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/ChangeLog	Fri Feb 26 15:52:24 2010 +0000
+++ b/lib-src/ChangeLog	Tue Mar 02 05:22:10 2010 -0600
@@ -1,3 +1,13 @@
+2010-03-02  Ben Wing  <ben@xemacs.org>
+
+	* digest-doc.c:
+	* make-path.c:
+	`emacs' isn't defined, but HAVE_CONFIG_H is, so use it to get
+	config.h.
+	
+	* getopt.h:
+	Conditionalize on HAVE_CONFIG_H to get real prototypes.
+
 2010-02-25  Ben Wing  <ben@xemacs.org>
 
 	* make-docfile.c:
--- a/lib-src/digest-doc.c	Fri Feb 26 15:52:24 2010 +0000
+++ b/lib-src/digest-doc.c	Tue Mar 02 05:22:10 2010 -0600
@@ -5,7 +5,7 @@
    See also sorted-doc.c, which produces similar output
    but in texinfo format and sorted by function/variable name.  */
 
-#ifdef emacs
+#ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 #include <stdio.h>
--- a/lib-src/getopt.h	Fri Feb 26 15:52:24 2010 +0000
+++ b/lib-src/getopt.h	Tue Mar 02 05:22:10 2010 -0600
@@ -98,7 +98,7 @@
 #define required_argument	1
 #define optional_argument	2
 
-#if defined (__GNU_LIBRARY__) || defined (__cplusplus) || defined (CYGWIN)
+#if defined (__GNU_LIBRARY__) || defined (__cplusplus) || defined (HAVE_CONFIG_H)
 /* Many other libraries have conflicting prototypes for getopt, with
    differences in the consts, in stdlib.h.  To avoid compilation
    errors, only prototype getopt for the GNU C library.  */
--- a/lib-src/make-path.c	Fri Feb 26 15:52:24 2010 +0000
+++ b/lib-src/make-path.c	Tue Mar 02 05:22:10 2010 -0600
@@ -26,7 +26,7 @@
    command on some of the purer BSD systems (like Mt. Xinu) don't have
    that option. */
 
-#ifdef emacs
+#ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
--- a/src/ChangeLog	Fri Feb 26 15:52:24 2010 +0000
+++ b/src/ChangeLog	Tue Mar 02 05:22:10 2010 -0600
@@ -1,3 +1,24 @@
+2010-03-02  Ben Wing  <ben@xemacs.org>
+
+	* Makefile.in.in:
+	* Makefile.in.in (objs):
+	glyphs-shared.o, glyphs-eimage.o only needed when HAVE_WINDOW_SYSTEM.
+	glyphs-widget.o should be too, but we need a bit of work ifdeffing
+	out the subwindow stuff from redisplay.c et al.
+	
+	* bytecode.c (init_opcode_table_multi_op):
+	Change var name to avoid shadowing with `basename'.
+	
+	* emacs.c (main_1):
+	Don't call init/etc. routines for glyphs-shared, glyphs-eimage unless
+	HAVE_WINDOW_SYSTEM is defined.
+	
+	* linuxplay.c:
+	* linuxplay.c (sighandler):
+	* vdb-posix.c (vdb_fault_handler):
+	Use const for variables holding string constants to avoid C++
+	warnings.
+
 2010-02-26  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* file-coding.c (Fmake_coding_system_internal):
--- a/src/Makefile.in.in	Fri Feb 26 15:52:24 2010 +0000
+++ b/src/Makefile.in.in	Tue Mar 02 05:22:10 2010 -0600
@@ -183,6 +183,10 @@
 event_unixoid_objs=event-unixoid.o
 #endif
 
+#ifdef HAVE_WINDOW_SYSTEM
+glyphs_objs=glyphs-eimage.o glyphs-shared.o
+#endif
+
 #ifdef HAVE_GPM
 gpm_objs=gpmevent.o
 #endif
@@ -281,8 +285,8 @@
  event-stream.o $(event_unixoid_objs) $(extra_objs) extents.o\
  faces.o file-coding.o fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o \
  font-lock.o frame.o\
- gc.o general.o glyphs.o glyphs-eimage.o glyphs-shared.o\
- glyphs-widget.o $(gpm_objs) $(gtk_objs) $(gtk_gui_objs) $(gui_objs) \
+ gc.o general.o glyphs.o $(glyphs_objs) glyphs-widget.o \
+ $(gpm_objs) $(gtk_objs) $(gtk_gui_objs) $(gui_objs) \
  gutter.o\
  hash.o imgproc.o indent.o insdel.o intl.o\
  keymap.o $(RTC_patch_objs) line-number.o $(ldap_objs) lread.o lstream.o\
--- a/src/bytecode.c	Fri Feb 26 15:52:24 2010 +0000
+++ b/src/bytecode.c	Tue Mar 02 05:22:10 2010 -0600
@@ -2823,14 +2823,14 @@
 static void
 init_opcode_table_multi_op (Opcode op)
 {
-  const Ascbyte *basename = opcode_name_table[op];
+  const Ascbyte *base = opcode_name_table[op];
   Ascbyte temp[300];
   int i;
 
   for (i = 1; i < 7; i++)
     {
       assert (!opcode_name_table[op + i]);
-      sprintf (temp, "%s+%d", basename, i);
+      sprintf (temp, "%s+%d", base, i);
       opcode_name_table[op + i] = xstrdup (temp);
     }
 }
--- a/src/emacs.c	Fri Feb 26 15:52:24 2010 +0000
+++ b/src/emacs.c	Tue Mar 02 05:22:10 2010 -0600
@@ -1538,8 +1538,10 @@
       syms_of_frame ();
       syms_of_general ();
       syms_of_glyphs ();
+#ifdef HAVE_WINDOW_SYSTEM
       syms_of_glyphs_eimage ();
       syms_of_glyphs_shared ();
+#endif
       syms_of_glyphs_widget ();
       syms_of_gui ();
       syms_of_gutter ();
@@ -1873,7 +1875,9 @@
 	 called before the any calls to the other macros. */
 
       image_instantiator_format_create ();
+#ifdef HAVE_WINDOW_SYSTEM
       image_instantiator_format_create_glyphs_eimage ();
+#endif
       image_instantiator_format_create_glyphs_widget ();
 #ifdef HAVE_TTY
       image_instantiator_format_create_glyphs_tty ();
@@ -2104,7 +2108,9 @@
       vars_of_frame ();
       vars_of_gc ();
       vars_of_glyphs ();
+#ifdef HAVE_WINDOW_SYSTEM
       vars_of_glyphs_eimage ();
+#endif
       vars_of_glyphs_widget ();
       vars_of_gui ();
       vars_of_gutter ();
--- a/src/linuxplay.c	Fri Feb 26 15:52:24 2010 +0000
+++ b/src/linuxplay.c	Tue Mar 02 05:22:10 2010 -0600
@@ -72,7 +72,7 @@
 static int           mix_fd;
 static int           audio_vol;
 static int           audio_fd;
-static Ascbyte    *audio_dev = "/dev/dsp";
+static const Ascbyte *audio_dev = "/dev/dsp";
 
 /* Intercept SIGINT and SIGHUP in order to close the audio and mixer
    devices before terminating sound output; this requires reliable
--- a/src/vdb-posix.c	Fri Feb 26 15:52:24 2010 +0000
+++ b/src/vdb-posix.c	Tue Mar 02 05:22:10 2010 -0600
@@ -73,7 +73,7 @@
     }
   else  /* default sigsegv handler */
     {
-      char *signal_name = "";
+      const Ascbyte *signal_name = "";
       if (signum == SIGSEGV)
 	signal_name = "SIGSEGV";
       else if (signum == SIGBUS)