gcc-4.1.0 seems to be stricter about certain things than gcc-3.4.4
was. I just built and installed gcc-4.1.0 and these fixes seem to be
necessary. Please review; barring feedback I will commit soon.
Here are the error messages I observed:
gcc -c -I/usr/local/gcc-4.1.0/include/noX -Os -malign-double -pipe
-ffast-math -Demacs -I. -DHAVE_CONFIG_H -Wno-sign-compare
-fno-caller-saves
/usr/local/src/xemacs-21.4-2006-03-17/src/dialog-msw.c
/usr/local/src/xemacs-21.4-2006-03-17/src/dialog-msw.c:45: error:
static declaration of 'Q_title' follows non-static declaration
/usr/local/src/xemacs-21.4-2006-03-17/src/general-slots.h:239: error:
previous declaration of 'Q_title' was here
/usr/local/src/xemacs-21.4-2006-03-17/src/dialog-msw.c: In function
'handle_directory_dialog_box':
/usr/local/src/xemacs-21.4-2006-03-17/src/dialog-msw.c:402: error:
invalid lvalue in assignment
make[1]: *** [dialog-msw.o] Error 1
gcc -c -I/usr/local/gcc-4.1.0/include/noX
-I/usr/local/gcc-4.1.0/include/noX -Os -malign-double -pipe
-ffast-math -Demacs -I. -DHAVE_CONFIG_H -Wno-sign-compare
-fno-caller-saves
/usr/local/src/xemacs-21.4-2006-03-11/src/glyphs-msw.c
/usr/local/src/xemacs-21.4-2006-03-11/src/glyphs-msw.c:1463: error:
static declaration of 'initialized' follows non-static declaration
/usr/local/src/xemacs-21.4-2006-03-11/src/lisp.h:2216: error: previous
declaration of 'initialized' was here
make: *** [glyphs-msw.o] Error 1
Index: src/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.290.2.107
diff -a -u -U0 -r1.290.2.107 ChangeLog
--- src/ChangeLog 2006/01/29 00:00:37 1.290.2.107
+++ src/ChangeLog 2006/03/17 21:05:00
@@ -0,0 +1,9 @@
+2006-03-17 Vin Shelton <acs(a)xemacs.org>
+
+ * dialog-msw.c (handle_directory_dialog_box): Don't declare
+ Q_title here. LOCAL_FILE_FORMAT_TO_TSTR requires an lvalue.
+
+ * glyphs-msw.c (read_bitmap_data): change 'initialized' to
+ 'hex_initialized' because it conflicts with 'initialized' in
+ lisp.h.
+
Index: src/dialog-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/dialog-msw.c,v
retrieving revision 1.7.2.3
diff -a -u -r1.7.2.3 dialog-msw.c
--- src/dialog-msw.c 2002/08/20 11:36:47 1.7.2.3
+++ src/dialog-msw.c 2006/03/17 21:05:14
@@ -42,7 +42,9 @@
static Lisp_Object Q_initial_directory;
static Lisp_Object Q_initial_filename;
static Lisp_Object Q_filter_list;
+/* Declared in general-slots.h
static Lisp_Object Q_title;
+*/
static Lisp_Object Q_allow_multi_select;
static Lisp_Object Q_create_prompt_on_nonexistent;
static Lisp_Object Q_overwrite_prompt;
@@ -400,7 +402,7 @@
bi.lpfn = handle_directory_proc;
LOCAL_FILE_FORMAT_TO_TSTR (Fexpand_file_name (build_string (""), Qnil),
- (char*)pd.fname);
+ pd.fname);
{
EXTERNAL_PROPERTY_LIST_LOOP_3 (key, value, keys)
Index: src/glyphs-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-msw.c,v
retrieving revision 1.28.2.4
diff -a -u -r1.28.2.4 glyphs-msw.c
--- src/glyphs-msw.c 2005/01/31 02:55:18 1.28.2.4
+++ src/glyphs-msw.c 2006/03/17 21:05:17
@@ -1460,7 +1460,7 @@
/* shared data for the image read/parse logic */
static short hexTable[256]; /* conversion value */
-static int initialized = FALSE; /* easier to fill in at run time */
+static int hex_initialized = FALSE; /* easier to fill in at run time */
/*
* Table index for the hex values. Initialized once, first time.
@@ -1494,7 +1494,7 @@
hexTable['}'] = -1; hexTable['\n'] = -1;
hexTable['\t'] = -1;
- initialized = TRUE;
+ hex_initialized = TRUE;
}
/*
@@ -1557,7 +1557,7 @@
#define Xmalloc(size) malloc(size)
/* first time initialization */
- if (initialized == FALSE) initHexTable();
+ if (hex_initialized == FALSE) initHexTable();
/* error cleanup and return macro */
#define RETURN(code) { if (data) free (data); return code; }
Regards,
Vin
Show replies by date