Mercurial > hg > xemacs-beta
changeset 4932:8b63e21b0436
fix compile issues with gcc 4
-------------------- ChangeLog entries follow: --------------------
ChangeLog addition:
2010-01-24 Ben Wing <ben@xemacs.org>
* aclocal.m4 (XE_SHLIB_STUFF):
Use -export-all-symbols instead of -export-dynamic on PE targets
(Cygwin and MinGW).
* configure.ac (XE_EXPAND_VARIABLE):
* configure.ac (TAB):
Create variable XEMACS_CC_GPP to check whether we're running g++.
Don't just check for an executable called `g++' -- it might be
called g++-4 or whatever. Instead, check for either named `g++*'
or claiming to be g++ when called with --version. Rewrite code do
use the variable.
Add -fno-strict-aliasing to optimization flags when GCC and
optimized, and in all cases with g++, since under these circumstances
strict aliasing is otherwise assumed, and XEmacs can't easily be
made to respect its restrictions.
* configure: Regenerate.
lib-src/ChangeLog addition:
2010-01-24 Ben Wing <ben@xemacs.org>
* fakemail.c (args_size):
* fakemail.c (parse_header):
* ootags.c (C_entries):
Fix warnings about possible use of uninitialized vars.
lwlib/ChangeLog addition:
2010-01-24 Ben Wing <ben@xemacs.org>
* xlwgauge.c (GaugeResize):
* xlwgauge.c (GaugeSize):
Fix warnings about possible use of uninitialized vars.
modules/ChangeLog addition:
2010-01-24 Ben Wing <ben@xemacs.org>
* postgresql/postgresql.c (CHECK_LIVE_CONNECTION):
* postgresql/postgresql.c (print_pgconn):
* postgresql/postgresql.c (Fpq_connectdb):
* postgresql/postgresql.c (Fpq_connect_start):
* postgresql/postgresql.c (Fpq_exec):
* postgresql/postgresql.c (Fpq_get_result):
Fix g++ 4.3 complaints about implicit conversions of string
literals (const char *) to char *.
src/ChangeLog addition:
2010-01-24 Ben Wing <ben@xemacs.org>
* chartab.c (decode_char_table_range):
* extents.c (extent_fragment_update):
* objects-msw.c (initialize_font_instance):
* process.c (Fgetenv):
* redisplay-output.c (get_next_display_block):
Fix warnings about possible use of uninitialized vars.
* compiler.h:
* compiler.h (REGISTER):
* event-stream.c (is_scrollbar_event):
* window.c (window_scrollbar_width):
* window.c (window_scrollbar_height):
* window.c (window_left_window_gutter_width):
* window.c (window_right_window_gutter_width):
Add USED_IF_SCROLLBARS. Use it to fix warnings about unused
vars when --with-scrollbars=no.
* config.h.in:
Change comment to explain better why DECLARE_INLINE_HEADER
is needed.
* dialog-msw.c:
* emacs.c (SHEBANG_EXE_PROGNAME_LENGTH):
* emacs.c (main_1):
* event-msw.c (struct mswin_message_debug):
* event-msw.c (debug_output_mswin_message):
* font-mgr.c:
* font-mgr.c (Ffc_config_filename):
* glyphs-msw.c (struct):
* glyphs-msw.c (bitmap_table):
* glyphs-x.c (update_widget_face):
* intl-win32.c (struct lang_to_string):
* intl-win32.c (lang_to_string_table):
* nas.c:
* objects-xlike-inc.c:
* objects-xlike-inc.c (xft_find_charset_font):
* syswindows.h:
* win32.c (mswindows_output_last_error):
Fix g++ 4.3 complaints about implicit conversions of string
literals (const char *) to char *.
* lisp.h:
G++ 4.3 needs #include <limits> to avoid errors about min/max.
* lisp.h (disabled_assert_with_message):
Use disabled_assert* whenever asserts are disabled. Rewrite
disabled_assert* to avoid complaints about unused vars by
pretending to use the vars but casting them to (void).
Remove code that defined assert() weirdly if DEBUG_XEMACS but
not USE_ASSERTIONS -- configure sets USE_ASSERTIONS automatically
when DEBUG_XEMACS, and if the user has forced it off, then
so be it.
* lisp.h (SYMBOL_KEYWORD):
Put some of the combined `extern Lisp_Object's back under
the file they are declared in. Cosmetic fix.
* number.h:
Remove `extern Lisp_Object' decls that duplicate lisp.h,
since they have different C vs. C++ linkage.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sun, 24 Jan 2010 22:04:58 -0600 |
parents | 8a08cf0b7583 |
children | 77e3b19bd245 |
files | ChangeLog aclocal.m4 configure configure.ac lib-src/ChangeLog lib-src/fakemail.c lib-src/ootags.c lwlib/ChangeLog lwlib/xlwgauge.c modules/ChangeLog modules/postgresql/postgresql.c src/ChangeLog src/chartab.c src/compiler.h src/config.h.in src/dialog-msw.c src/emacs.c src/event-msw.c src/event-stream.c src/extents.c src/font-mgr.c src/glyphs-msw.c src/glyphs-x.c src/intl-win32.c src/lisp.h src/nas.c src/number.h src/objects-msw.c src/objects-xlike-inc.c src/process.c src/redisplay-output.c src/syswindows.h src/win32.c src/window.c |
diffstat | 34 files changed, 514 insertions(+), 318 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Jan 21 00:46:37 2010 -0600 +++ b/ChangeLog Sun Jan 24 22:04:58 2010 -0600 @@ -1,3 +1,26 @@ +2010-01-24 Ben Wing <ben@xemacs.org> + + * aclocal.m4 (XE_SHLIB_STUFF): + Use -export-all-symbols instead of -export-dynamic on PE targets + (Cygwin and MinGW). + + * configure.ac (XE_EXPAND_VARIABLE): + * configure.ac (TAB): + Create variable XEMACS_CC_GPP to check whether we're running g++. + Don't just check for an executable called `g++' -- it might be + called g++-4 or whatever. Instead, check for either named `g++*' + or claiming to be g++ when called with --version. Rewrite code do + use the variable. + + Add -fno-strict-aliasing to optimization flags when GCC and + optimized, and in all cases with g++, since under these circumstances + strict aliasing is otherwise assumed, and XEmacs can't easily be + made to respect its restrictions. + + * configure: Regenerate. + + + 2010-01-14 Ben Wing <ben@xemacs.org> * PROBLEMS:
--- a/aclocal.m4 Thu Jan 21 00:46:37 2010 -0600 +++ b/aclocal.m4 Sun Jan 24 22:04:58 2010 -0600 @@ -513,10 +513,17 @@ dnl usually need to be prefix with ${wl} or some other such thing. dnl -if test "$xe_gnu_ld" = yes; then - if test "$ld_shlibs" = yes; then +if test "$xe_gnu_ld" = yes -a "$ld_shlibs" = yes; then + case "$xehost_os" in + *cygwin* | *mingw* ) + # -export-all-symbols is the PE equivalent of ELF-specific -export-dynamic + ld_dynamic_link_flags="${wl}-export-all-symbols" + ;; + + *) ld_dynamic_link_flags="${wl}-export-dynamic" - fi + ;; + esac fi if test -z "$ld_dynamic_link_flags"; then
--- a/configure Thu Jan 21 00:46:37 2010 -0600 +++ b/configure Sun Jan 24 22:04:58 2010 -0600 @@ -1,12 +1,14 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.64 for XEmacs 21.5. +# Generated by GNU Autoconf 2.65 for XEmacs 21.5. # # Report bugs to <xemacs-beta@xemacs.org>. # +# # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -573,7 +575,8 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -exec 7<&0 </dev/null 6>&1 +test -n "$DJDIR" || exec 7<&0 </dev/null +exec 6>&1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -1986,7 +1989,7 @@ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor YACC The `Yet Another C Compiler' implementation to use. Defaults to @@ -2063,7 +2066,7 @@ if $ac_init_version; then cat <<\_ACEOF XEmacs configure 21.5 -generated by GNU Autoconf 2.64 +generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -2156,7 +2159,7 @@ ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -2193,7 +2196,7 @@ ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -2328,7 +2331,7 @@ fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -2405,7 +2408,7 @@ # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -2800,7 +2803,7 @@ fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - return $ac_retval + as_fn_set_status $ac_retval } # ac_fn_c_compute_int cat >config.log <<_ACEOF @@ -2808,7 +2811,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by XEmacs $as_me 21.5, which was -generated by GNU Autoconf 2.64. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -3061,7 +3064,7 @@ for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 @@ -3070,9 +3073,9 @@ done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in @@ -6295,32 +6298,30 @@ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err - fi + fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <stdio.h> -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; + +int +main () +{ ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -6382,10 +6383,10 @@ else ac_file='' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : - $as_echo "$as_me: failed program was:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 @@ -6393,51 +6394,18 @@ { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } -fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" @@ -6470,13 +6438,72 @@ as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi -rm -f conftest$ac_cv_exeext +rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdio.h> +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : @@ -7535,8 +7562,8 @@ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err - fi + fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -8083,8 +8110,8 @@ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err - fi + fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -8631,8 +8658,8 @@ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 - rm -f conftest.er1 conftest.err - fi + fi + rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -8908,6 +8935,24 @@ : ${XEMACS_CC:="$CC"} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using g++" >&5 +$as_echo_n "checking whether we are using g++... " >&6; } + +XEMACS_CC_GPP=no +case "$XEMACS_CC" in + *g++* ) XEMACS_CC_GPP=yes ;; +esac + +if test "$XEMACS_CC_GPP" = "no" -a "$GCC" = "yes"; then + case "`$XEMACS_CC --version`" in + g++* ) XEMACS_CC_GPP=yes ;; + esac +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XEMACS_CC_GPP" >&5 +$as_echo "$XEMACS_CC_GPP" >&6; } + + test -n "$CPP" -a -d "$CPP" && CPP= test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" @@ -9436,26 +9481,15 @@ xemacs_cc_cc_mismatch=no if test "$CC" != "$XEMACS_CC"; then - case "$XEMACS_CC" in - *g++* ) - if test "$GCC" != "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: CC and g++ are mismatched; XE_CFLAGS may be wrong" >&5 + if test "$XEMACS_CC_GPP" = "yes" -a "$GCC" != "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: CC and g++ are mismatched; XE_CFLAGS may be wrong" >&5 $as_echo "$as_me: WARNING: CC and g++ are mismatched; XE_CFLAGS may be wrong" >&2;} - xemacs_cc_cc_mismatch=yes - fi - ;; - esac - if test -n "$GCC"; then - case $XEMACS_CC in - *g++* ) - # it's as expected, do nothing - ;; - * ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong" >&5 + xemacs_cc_cc_mismatch=yes + fi + if test -n "$GCC" -a "$XEMACS_CC_GPP" != "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong" >&5 $as_echo "$as_me: WARNING: gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong" >&2;} - xemacs_cc_cc_mismatch=yes - ;; - esac + xemacs_cc_cc_mismatch=yes fi fi @@ -9478,10 +9512,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for preferred optimization flags" >&5 $as_echo_n "checking for preferred optimization flags... " >&6; } -if test "$with_optimization" = "yes" ; then - if test "$cflags_optimization_specified" = "no"; then +if test "$cflags_optimization_specified" = "no"; then + if test "$with_optimization" = "yes" ; then if test "$GCC" = "yes"; then - with_cflags_optimization="-O3" + with_cflags_optimization="-O3 -fno-strict-aliasing" elif test "$__SUNPRO_C" = "yes"; then case "$opsys" in sol2 ) with_cflags_optimization="-xO4" ;; @@ -9494,9 +9528,9 @@ with_cflags_optimization="-O3 -Ob2" else with_cflags_optimization="-O" ; fi - fi -else - with_cflags_optimization= + elif test "$XEMACS_CC_GPP" = "yes" ; then + with_cflags_optimization="-fno-strict-aliasing" + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_cflags_optimization}" >&5 @@ -9539,7 +9573,7 @@ test "$__GCC" -ge 3 && with_cflags_warning="$with_cflags_warning -Wpacked" test "$have_glibc" != "yes" && \ with_cflags_warning="$with_cflags_warning -Wpointer-arith" - if test "$with_xemacs_compiler" = "g++"; then + if test "$XEMACS_CC_GPP" = "yes"; then xe_cflags_warning="$with_cflags_warning -Weffc++" elif test "$__GCC" -ge 3; then xe_cflags_warning="$with_cflags_warning -Wunused-parameter" @@ -13882,7 +13916,7 @@ -if test "$with_xemacs_compiler" = "g++"; then +if test "$XEMACS_CC_GPP" = "yes"; then LIBSTDCPP=-lstdc++ else LIBSTDCPP= @@ -14554,10 +14588,17 @@ fi # End of if cc_produces_so = no -if test "$xe_gnu_ld" = yes; then - if test "$ld_shlibs" = yes; then +if test "$xe_gnu_ld" = yes -a "$ld_shlibs" = yes; then + case "$xehost_os" in + *cygwin* | *mingw* ) + # -export-all-symbols is the PE equivalent of ELF-specific -export-dynamic + ld_dynamic_link_flags="${wl}-export-all-symbols" + ;; + + *) ld_dynamic_link_flags="${wl}-export-dynamic" - fi + ;; + esac fi if test -z "$ld_dynamic_link_flags"; then @@ -20646,41 +20687,41 @@ $as_echo "#define USE_SYSTEM_MALLOC 1" >>confdefs.h fi -test "$GCC" = "yes" && $as_echo "#define USE_GCC 1" >>confdefs.h - -test "$with_xemacs_compiler" = "g++" && $as_echo "#define USE_GPLUSPLUS 1" >>confdefs.h +test "$GCC" = "yes" && $as_echo "#define USE_GCC 1" >>confdefs.h + +test "$XEMACS_CC_GPP" = "yes" && $as_echo "#define USE_GPLUSPLUS 1" >>confdefs.h test "$with_external_widget" = "yes" && $as_echo "#define EXTERNAL_WIDGET 1" >>confdefs.h -test "$with_kkcc" = "yes" && $as_echo "#define USE_KKCC 1" >>confdefs.h - -test "$with_newgc" = "yes" && $as_echo "#define NEW_GC 1" >>confdefs.h - -test "$have_vdb_posix" = "yes" && $as_echo "#define VDB_POSIX 1" >>confdefs.h - -test "$have_vdb_fake" = "yes" && $as_echo "#define VDB_FAKE 1" >>confdefs.h - -test "$with_quick_build" = "yes" && $as_echo "#define QUICK_BUILD 1" >>confdefs.h - -test "$with_purify" = "yes" && $as_echo "#define PURIFY 1" >>confdefs.h - -test "$with_quantify" = "yes" && $as_echo "#define QUANTIFY 1" >>confdefs.h - -test "$with_valgrind" = "yes" && $as_echo "#define USE_VALGRIND 1" >>confdefs.h - -test "$with_pop" = "yes" && $as_echo "#define MAIL_USE_POP 1" >>confdefs.h - -test "$with_kerberos" = "yes" && $as_echo "#define KERBEROS 1" >>confdefs.h - -test "$with_hesiod" = "yes" && $as_echo "#define HESIOD 1" >>confdefs.h - -test "$with_union_type" = "yes" && $as_echo "#define USE_UNION_TYPE 1" >>confdefs.h - -test "$with_pdump" = "yes" && $as_echo "#define PDUMP 1" >>confdefs.h - -test "$with_dump_in_exec" = "yes" && $as_echo "#define DUMP_IN_EXEC 1" >>confdefs.h - -test "$with_ipv6_cname" = "yes" && $as_echo "#define IPV6_CANONICALIZE 1" >>confdefs.h +test "$with_kkcc" = "yes" && $as_echo "#define USE_KKCC 1" >>confdefs.h + +test "$with_newgc" = "yes" && $as_echo "#define NEW_GC 1" >>confdefs.h + +test "$have_vdb_posix" = "yes" && $as_echo "#define VDB_POSIX 1" >>confdefs.h + +test "$have_vdb_fake" = "yes" && $as_echo "#define VDB_FAKE 1" >>confdefs.h + +test "$with_quick_build" = "yes" && $as_echo "#define QUICK_BUILD 1" >>confdefs.h + +test "$with_purify" = "yes" && $as_echo "#define PURIFY 1" >>confdefs.h + +test "$with_quantify" = "yes" && $as_echo "#define QUANTIFY 1" >>confdefs.h + +test "$with_valgrind" = "yes" && $as_echo "#define USE_VALGRIND 1" >>confdefs.h + +test "$with_pop" = "yes" && $as_echo "#define MAIL_USE_POP 1" >>confdefs.h + +test "$with_kerberos" = "yes" && $as_echo "#define KERBEROS 1" >>confdefs.h + +test "$with_hesiod" = "yes" && $as_echo "#define HESIOD 1" >>confdefs.h + +test "$with_union_type" = "yes" && $as_echo "#define USE_UNION_TYPE 1" >>confdefs.h + +test "$with_pdump" = "yes" && $as_echo "#define PDUMP 1" >>confdefs.h + +test "$with_dump_in_exec" = "yes" && $as_echo "#define DUMP_IN_EXEC 1" >>confdefs.h + +test "$with_ipv6_cname" = "yes" && $as_echo "#define IPV6_CANONICALIZE 1" >>confdefs.h @@ -21531,7 +21572,7 @@ # values after options handling. ac_log=" This file was extended by XEmacs $as_me 21.5, which was -generated by GNU Autoconf 2.64. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -21571,6 +21612,7 @@ -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -21593,10 +21635,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ XEmacs config.status 21.5 -configured by $0, generated by GNU Autoconf 2.64, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation @@ -21632,6 +21675,8 @@ ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) @@ -21826,7 +21871,7 @@ t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -21840,7 +21885,7 @@ t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p
--- a/configure.ac Thu Jan 21 00:46:37 2010 -0600 +++ b/configure.ac Sun Jan 24 22:04:58 2010 -0600 @@ -1591,6 +1591,31 @@ test -n "$with_xemacs_compiler" && XEMACS_CC="$with_xemacs_compiler" : ${XEMACS_CC:="$CC"} +dnl Are we using g++? + +AC_MSG_CHECKING(whether we are using g++) + +dnl Is it named g++*? +XEMACS_CC_GPP=no +case "$XEMACS_CC" in + *g++* ) XEMACS_CC_GPP=yes ;; +esac + +dnl If it's known to be in the GCC family, does it claim to be g++? We don't +dnl run this test unless we know it's GCC-like, because not all compilers +dnl accept --version. +dnl +dnl It's not clear we need both tests, but it doesn't hurt. g++ might not +dnl have always output "g++" as the first thing in its version string, and +dnl might not always in the future. +if test "$XEMACS_CC_GPP" = "no" -a "$GCC" = "yes"; then + case "`$XEMACS_CC --version`" in + g++* ) XEMACS_CC_GPP=yes ;; + esac +fi + +AC_MSG_RESULT($XEMACS_CC_GPP) + dnl Figure out what C preprocessor to use. dnl On Sun systems, people sometimes set up the variable CPP @@ -1877,24 +1902,13 @@ xemacs_cc_cc_mismatch=no if test "$CC" != "$XEMACS_CC"; then - case "$XEMACS_CC" in - *g++* ) - if test "$GCC" != "yes"; then - AC_MSG_WARN([CC and g++ are mismatched; XE_CFLAGS may be wrong]) - xemacs_cc_cc_mismatch=yes - fi - ;; - esac - if test -n "$GCC"; then - case $XEMACS_CC in - *g++* ) - # it's as expected, do nothing - ;; - * ) - AC_MSG_WARN([gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong]) - xemacs_cc_cc_mismatch=yes - ;; - esac + if test "$XEMACS_CC_GPP" = "yes" -a "$GCC" != "yes"; then + AC_MSG_WARN([CC and g++ are mismatched; XE_CFLAGS may be wrong]) + xemacs_cc_cc_mismatch=yes + fi + if test -n "$GCC" -a "$XEMACS_CC_GPP" != "yes" ; then + AC_MSG_WARN([gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong]) + xemacs_cc_cc_mismatch=yes fi dnl #### Add other detectable mismatches here. fi @@ -1919,12 +1933,17 @@ fi AC_MSG_CHECKING([for preferred optimization flags]) -if test "$with_optimization" = "yes" ; then - if test "$cflags_optimization_specified" = "no"; then +if test "$cflags_optimization_specified" = "no"; then + if test "$with_optimization" = "yes" ; then dnl Following values of cflags_optimization are known to work well. dnl Should we take debugging options into consideration? if test "$GCC" = "yes"; then - with_cflags_optimization="-O3" + dnl If you want to remove the -fno-strict-aliasing, then you will have + dnl to rewrite all cases of "type-punning" expressions like + dnl (* (foo *) (&bar)), which occur all over XEmacs, by making `bar' a + dnl union (use an anonymous union if you're willing to put in an ifdef + dnl for anon-union support, falling back to the type-punned expression. + with_cflags_optimization="-O3 -fno-strict-aliasing" elif test "$__SUNPRO_C" = "yes"; then case "$opsys" in sol2 ) with_cflags_optimization="-xO4" ;; @@ -1940,9 +1959,12 @@ else with_cflags_optimization="-O" ;dnl The only POSIX-approved flag fi + elif test "$XEMACS_CC_GPP" = "yes" ; then + dnl Fuck me! g++ v4 turns on strict aliasing by default, even without + dnl optimization. See comment above about why we can't have strict + dnl aliasing currently in XEmacs. + with_cflags_optimization="-fno-strict-aliasing" fi -else - with_cflags_optimization= fi AC_MSG_RESULT([${with_cflags_optimization}]) @@ -2005,7 +2027,7 @@ dnl But gcc warns about -Weffc++ in C compiles. dnl With g++, there is no effective way to use -Wunused-parameter without dnl some very ugly code changes. - if test "$with_xemacs_compiler" = "g++"; then + if test "$XEMACS_CC_GPP" = "yes"; then xe_cflags_warning="$with_cflags_warning -Weffc++" elif test "$__GCC" -ge 3; then xe_cflags_warning="$with_cflags_warning -Wunused-parameter" @@ -3312,7 +3334,7 @@ dnl If g++ is used, we have to explicitly link modules with -lstdc++ on Cygwin dnl to avoid undefined symbol errors. This will never hurt, so just do it on dnl all platforms in case others have the same brain damage. -if test "$with_xemacs_compiler" = "g++"; then +if test "$XEMACS_CC_GPP" = "yes"; then LIBSTDCPP=-lstdc++ else LIBSTDCPP= @@ -5490,24 +5512,24 @@ elif test "$with_debug_malloc" = "yes"; then AC_DEFINE(USE_DEBUG_MALLOC) AC_DEFINE(USE_SYSTEM_MALLOC) fi -test "$GCC" = "yes" && AC_DEFINE(USE_GCC) -test "$with_xemacs_compiler" = "g++" && AC_DEFINE(USE_GPLUSPLUS) +test "$GCC" = "yes" && AC_DEFINE(USE_GCC) +test "$XEMACS_CC_GPP" = "yes" && AC_DEFINE(USE_GPLUSPLUS) test "$with_external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET) -test "$with_kkcc" = "yes" && AC_DEFINE(USE_KKCC) -test "$with_newgc" = "yes" && AC_DEFINE(NEW_GC) -test "$have_vdb_posix" = "yes" && AC_DEFINE(VDB_POSIX) -test "$have_vdb_fake" = "yes" && AC_DEFINE(VDB_FAKE) -test "$with_quick_build" = "yes" && AC_DEFINE(QUICK_BUILD) -test "$with_purify" = "yes" && AC_DEFINE(PURIFY) -test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY) -test "$with_valgrind" = "yes" && AC_DEFINE(USE_VALGRIND) -test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP) -test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS) -test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD) -test "$with_union_type" = "yes" && AC_DEFINE(USE_UNION_TYPE) -test "$with_pdump" = "yes" && AC_DEFINE(PDUMP) -test "$with_dump_in_exec" = "yes" && AC_DEFINE(DUMP_IN_EXEC) -test "$with_ipv6_cname" = "yes" && AC_DEFINE(IPV6_CANONICALIZE) +test "$with_kkcc" = "yes" && AC_DEFINE(USE_KKCC) +test "$with_newgc" = "yes" && AC_DEFINE(NEW_GC) +test "$have_vdb_posix" = "yes" && AC_DEFINE(VDB_POSIX) +test "$have_vdb_fake" = "yes" && AC_DEFINE(VDB_FAKE) +test "$with_quick_build" = "yes" && AC_DEFINE(QUICK_BUILD) +test "$with_purify" = "yes" && AC_DEFINE(PURIFY) +test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY) +test "$with_valgrind" = "yes" && AC_DEFINE(USE_VALGRIND) +test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP) +test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS) +test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD) +test "$with_union_type" = "yes" && AC_DEFINE(USE_UNION_TYPE) +test "$with_pdump" = "yes" && AC_DEFINE(PDUMP) +test "$with_dump_in_exec" = "yes" && AC_DEFINE(DUMP_IN_EXEC) +test "$with_ipv6_cname" = "yes" && AC_DEFINE(IPV6_CANONICALIZE)
--- a/lib-src/ChangeLog Thu Jan 21 00:46:37 2010 -0600 +++ b/lib-src/ChangeLog Sun Jan 24 22:04:58 2010 -0600 @@ -1,3 +1,10 @@ +2010-01-24 Ben Wing <ben@xemacs.org> + + * fakemail.c (args_size): + * fakemail.c (parse_header): + * ootags.c (C_entries): + Fix warnings about possible use of uninitialized vars. + 2010-01-15 Ben Wing <ben@xemacs.org> * make-mswin-unicode.pl:
--- a/lib-src/fakemail.c Thu Jan 21 00:46:37 2010 -0600 +++ b/lib-src/fakemail.c Sun Jan 24 22:04:58 2010 -0600 @@ -512,7 +512,7 @@ register int size = 0; do { - char *field; + char *field = NULL; register char *keyword = get_keyword (the_header->text->string, &field); if ((strcmp (keyword, "TO") == 0) || (strcmp (keyword, "CC") == 0) || @@ -535,7 +535,7 @@ register header old = the_header; do { - char *field; + char *field = NULL; register char *keyword = get_keyword (the_header->text->string, &field); if (strcmp (keyword, "TO") == 0) where = add_field (the_header->text->continuation, field, where);
--- a/lib-src/ootags.c Thu Jan 21 00:46:37 2010 -0600 +++ b/lib-src/ootags.c Sun Jan 24 22:04:58 2010 -0600 @@ -2639,7 +2639,7 @@ int parlev; /* current parenthesis level */ bool incomm, inquote, inchar, quotednl, midtoken; bool cplpl, cjava; - token savetok; /* token saved during preprocessor handling */ + token savetok = {0}; /* token saved during preprocessor handling */ tokoff = toklen = 0; /* keep compiler quiet */
--- a/lwlib/ChangeLog Thu Jan 21 00:46:37 2010 -0600 +++ b/lwlib/ChangeLog Sun Jan 24 22:04:58 2010 -0600 @@ -1,3 +1,9 @@ +2010-01-24 Ben Wing <ben@xemacs.org> + + * xlwgauge.c (GaugeResize): + * xlwgauge.c (GaugeSize): + Fix warnings about possible use of uninitialized vars. + 2009-12-09 Jerry James <james@xemacs.org> * lwlib-Xlw.c: Include needed Xmu headers instead of obsolete xmu.h.
--- a/lwlib/xlwgauge.c Thu Jan 21 00:46:37 2010 -0600 +++ b/lwlib/xlwgauge.c Sun Jan 24 22:04:58 2010 -0600 @@ -314,7 +314,7 @@ if( gw->gauge.nlabels > 1 ) { - Dimension lwm, lw0, lw1 ; /* width of max, left, right labels */ + Dimension lwm, lw0=0, lw1 ;/* width of max, left, right labels */ Dimension lh ; MaxLabel(gw,&lwm,&lh, &lw0,&lw1) ; @@ -1017,7 +1017,7 @@ */ if( gw->gauge.nlabels > 0 ) { - Dimension lwm, lw0, lw1 ; /* width of max, left, right labels */ + Dimension lwm, lw0=0, lw1 ;/* width of max, left, right labels */ Dimension lh ; MaxLabel(gw,&lwm,&lh, &lw0,&lw1) ;
--- a/modules/ChangeLog Thu Jan 21 00:46:37 2010 -0600 +++ b/modules/ChangeLog Sun Jan 24 22:04:58 2010 -0600 @@ -1,3 +1,14 @@ +2010-01-24 Ben Wing <ben@xemacs.org> + + * postgresql/postgresql.c (CHECK_LIVE_CONNECTION): + * postgresql/postgresql.c (print_pgconn): + * postgresql/postgresql.c (Fpq_connectdb): + * postgresql/postgresql.c (Fpq_connect_start): + * postgresql/postgresql.c (Fpq_exec): + * postgresql/postgresql.c (Fpq_get_result): + Fix g++ 4.3 complaints about implicit conversions of string + literals (const char *) to char *. + 2010-01-16 Ben Wing <ben@xemacs.org> * common/Makefile.common:
--- a/modules/postgresql/postgresql.c Thu Jan 21 00:46:37 2010 -0600 +++ b/modules/postgresql/postgresql.c Sun Jan 24 22:04:58 2010 -0600 @@ -120,7 +120,7 @@ #define CHECK_LIVE_CONNECTION(P) do { \ if (!P || (PQstatus (P) != CONNECTION_OK)) { \ - char *e = "bad value"; \ + const char *e = "bad value"; \ if (P) e = PQerrorMessage (P); \ signal_ferror (Qprocess_error, "dead connection [%s]", e); \ } } while (0) @@ -203,7 +203,7 @@ char buf[256]; PGconn *P; ConnStatusType cst; - char *host="", *db="", *user="", *port=""; + const char *host="", *db="", *user="", *port=""; P = (XPGCONN (obj))->pgconn; @@ -472,7 +472,7 @@ { PGconn *P; Lisp_PGconn *lisp_pgconn; - char *error_message = "Out of Memory?"; + const char *error_message = "Out of Memory?"; char *c_conninfo; CHECK_STRING (conninfo); @@ -517,7 +517,7 @@ { PGconn *P; Lisp_PGconn *lisp_pgconn; - char *error_message = "Out of Memory?"; + const char *error_message = "Out of Memory?"; char *c_conninfo; CHECK_STRING (conninfo); @@ -919,7 +919,8 @@ R = PQexec (P, c_query); { - char *tag, buf[BLCKSZ]; + const Ascbyte *tag; + char buf[BLCKSZ]; if (!R) out_of_memory ("query: out of memory", Qunbound); else @@ -992,7 +993,8 @@ if (!R) return Qnil; /* not an error, there's no more data to get */ { - char *tag, buf[BLCKSZ]; + const Ascbyte *tag; + char buf[BLCKSZ]; switch (PQresultStatus (R)) {
--- a/src/ChangeLog Thu Jan 21 00:46:37 2010 -0600 +++ b/src/ChangeLog Sun Jan 24 22:04:58 2010 -0600 @@ -1,3 +1,66 @@ +2010-01-24 Ben Wing <ben@xemacs.org> + + * chartab.c (decode_char_table_range): + * extents.c (extent_fragment_update): + * objects-msw.c (initialize_font_instance): + * process.c (Fgetenv): + * redisplay-output.c (get_next_display_block): + Fix warnings about possible use of uninitialized vars. + + * compiler.h: + * compiler.h (REGISTER): + * event-stream.c (is_scrollbar_event): + * window.c (window_scrollbar_width): + * window.c (window_scrollbar_height): + * window.c (window_left_window_gutter_width): + * window.c (window_right_window_gutter_width): + Add USED_IF_SCROLLBARS. Use it to fix warnings about unused + vars when --with-scrollbars=no. + + * config.h.in: + Change comment to explain better why DECLARE_INLINE_HEADER + is needed. + + * dialog-msw.c: + * emacs.c (SHEBANG_EXE_PROGNAME_LENGTH): + * emacs.c (main_1): + * event-msw.c (struct mswin_message_debug): + * event-msw.c (debug_output_mswin_message): + * font-mgr.c: + * font-mgr.c (Ffc_config_filename): + * glyphs-msw.c (struct): + * glyphs-msw.c (bitmap_table): + * glyphs-x.c (update_widget_face): + * intl-win32.c (struct lang_to_string): + * intl-win32.c (lang_to_string_table): + * nas.c: + * objects-xlike-inc.c: + * objects-xlike-inc.c (xft_find_charset_font): + * syswindows.h: + * win32.c (mswindows_output_last_error): + Fix g++ 4.3 complaints about implicit conversions of string + literals (const char *) to char *. + + * lisp.h: + G++ 4.3 needs #include <limits> to avoid errors about min/max. + + * lisp.h (disabled_assert_with_message): + Use disabled_assert* whenever asserts are disabled. Rewrite + disabled_assert* to avoid complaints about unused vars by + pretending to use the vars but casting them to (void). + Remove code that defined assert() weirdly if DEBUG_XEMACS but + not USE_ASSERTIONS -- configure sets USE_ASSERTIONS automatically + when DEBUG_XEMACS, and if the user has forced it off, then + so be it. + + * lisp.h (SYMBOL_KEYWORD): + Put some of the combined `extern Lisp_Object's back under + the file they are declared in. Cosmetic fix. + + * number.h: + Remove `extern Lisp_Object' decls that duplicate lisp.h, + since they have different C vs. C++ linkage. + 2010-01-20 Ben Wing <ben@xemacs.org> * lrecord.h:
--- a/src/chartab.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/chartab.c Sun Jan 24 22:04:58 2010 -0600 @@ -226,6 +226,7 @@ static void decode_char_table_range (Lisp_Object range, struct chartab_range *outrange) { + xzero (*outrange); if (EQ (range, Qt)) outrange->type = CHARTAB_RANGE_ALL; else if (CHAR_OR_CHAR_INTP (range))
--- a/src/compiler.h Thu Jan 21 00:46:37 2010 -0600 +++ b/src/compiler.h Sun Jan 24 22:04:58 2010 -0600 @@ -243,6 +243,11 @@ # else # define USED_IF_XFT(decl) UNUSED (decl) # endif +# ifdef HAVE_SCROLLBARS +# define USED_IF_SCROLLBARS(decl) decl +# else +# define USED_IF_SCROLLBARS(decl) UNUSED (decl) +# endif #endif /* UNUSED */ #ifdef DEBUG_XEMACS
--- a/src/config.h.in Thu Jan 21 00:46:37 2010 -0600 +++ b/src/config.h.in Sun Jan 24 22:04:58 2010 -0600 @@ -1092,7 +1092,8 @@ /* Use DECLARE_INLINE_HEADER() to declare an inline function in a header file, like this: (This avoids the need to write a prototype directly - followed by the function header itself.) + followed by the function header itself, in order to avoid a + "no prototype" warning from GCC.) DECLARE_INLINE_HEADER (int foo (int x)) {
--- a/src/dialog-msw.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/dialog-msw.c Sun Jan 24 22:04:58 2010 -0600 @@ -297,7 +297,7 @@ static struct { DWORD errmess; - Ascbyte *errname; + const Ascbyte *errname; } common_dialog_errors[] = { { CDERR_DIALOGFAILURE, "CDERR_DIALOGFAILURE" },
--- a/src/emacs.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/emacs.c Sun Jan 24 22:04:58 2010 -0600 @@ -936,8 +936,8 @@ #define SHEBANG_PROGNAME_LENGTH \ (int)((sizeof (WEXTSTRING (SHEBANG_PROGNAME)) - sizeof (WEXTSTRING ("")))) -#define SHEBANG_EXE_PROGNAME_LENGTH \ - (int)(sizeof (WEXTSTRING (SHEBANG_PROGNAME) WEXTSTRING(".exe")) \ +#define SHEBANG_EXE_PROGNAME_LENGTH \ + (int)(sizeof (WEXTSTRING (SHEBANG_PROGNAME ".exe")) \ - sizeof (WEXTSTRING (""))) { @@ -959,7 +959,7 @@ int j; newarr[0] = argv[0]; - newarr[1] = WEXTSTRING ("--script"); + newarr[1] = (Wexttext *) WEXTSTRING ("--script"); for (j = 1; j < argc; ++j) { newarr[j + 1] = argv[j]; @@ -1252,7 +1252,7 @@ for (j = 0; j < count_before + 1; j++) new_[j] = argv[j]; - new_[count_before + 1] = WEXTSTRING ("-d"); + new_[count_before + 1] = (Wexttext *) WEXTSTRING ("-d"); new_[count_before + 2] = dpy; for (j = count_before + 2; j <argc; j++) new_[j + 1] = argv[j]; @@ -1262,7 +1262,7 @@ /* Change --display to -d, when its arg is separate. */ else if (dpy != 0 && skip_args > count_before && argv[count_before + 1][1] == '-') - argv[count_before + 1] = WEXTSTRING ("-d"); + argv[count_before + 1] = (Wexttext *) WEXTSTRING ("-d"); /* Don't actually discard this arg. */ skip_args = count_before;
--- a/src/event-msw.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/event-msw.c Sun Jan 24 22:04:58 2010 -0600 @@ -4670,7 +4670,7 @@ struct mswin_message_debug { int mess; - char *string; + const Ascbyte *string; }; #define FROB(val) { val, #val, }, @@ -4961,7 +4961,7 @@ { Lisp_Object frame = mswindows_find_frame (hwnd); int i; - char *str = 0; + const Ascbyte *str = 0; /* struct mswin_message_debug *i_hate_cranking_out_code_like_this; */ for (i = 0; i < countof (debug_mswin_messages); i++)
--- a/src/event-stream.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/event-stream.c Sun Jan 24 22:04:58 2010 -0600 @@ -4137,7 +4137,7 @@ } static int -is_scrollbar_event (Lisp_Object event) +is_scrollbar_event (Lisp_Object USED_IF_SCROLLBARS (event)) { #ifdef HAVE_SCROLLBARS Lisp_Object fun;
--- a/src/extents.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/extents.c Sun Jan 24 22:04:58 2010 -0600 @@ -3114,13 +3114,15 @@ if (extent_start (e) == mempos && !NILP (extent_begin_glyph (e))) { Lisp_Object glyph = extent_begin_glyph (e); - if (seen_glyph) { - struct glyph_block gb; - - gb.glyph = glyph; - gb.extent = wrap_extent (e); - Dynarr_add (ef->begin_glyphs, gb); - } + if (seen_glyph) + { + struct glyph_block gb; + + xzero (gb); + gb.glyph = glyph; + gb.extent = wrap_extent (e); + Dynarr_add (ef->begin_glyphs, gb); + } else if (EQ (glyph, last_glyph)) seen_glyph = 1; } @@ -3133,13 +3135,15 @@ if (extent_end (e) == mempos && !NILP (extent_end_glyph (e))) { Lisp_Object glyph = extent_end_glyph (e); - if (seen_glyph) { - struct glyph_block gb; - - gb.glyph = glyph; - gb.extent = wrap_extent (e); - Dynarr_add (ef->end_glyphs, gb); - } + if (seen_glyph) + { + struct glyph_block gb; + + xzero (gb); + gb.glyph = glyph; + gb.extent = wrap_extent (e); + Dynarr_add (ef->end_glyphs, gb); + } else if (EQ (glyph, last_glyph)) seen_glyph = 1; }
--- a/src/font-mgr.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/font-mgr.c Sun Jan 24 22:04:58 2010 -0600 @@ -180,7 +180,7 @@ ourselves; hash.c hashtables do not interpret the value pointers. This array should be FcChar8**, but GCC 4.x bitches about signedness. */ -static Extbyte *fc_standard_properties[] = { +static const Extbyte *fc_standard_properties[] = { /* treated specially, ordered first */ "family", "size", /* remaining are alphabetized by group */ @@ -838,7 +838,7 @@ FC_CONFIG_DIR environment variable. */ (name)) { - char *fcname = ""; + const Ascbyte *fcname = ""; if (!NILP (name)) {
--- a/src/glyphs-msw.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/glyphs-msw.c Sun Jan 24 22:04:58 2010 -0600 @@ -1101,7 +1101,7 @@ typedef struct { - CIbyte *name; + const Ascbyte *name; int resource_id; } resource_t;
--- a/src/glyphs-x.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/glyphs-x.c Sun Jan 24 22:04:58 2010 -0600 @@ -2382,7 +2382,7 @@ if (rf) { /* #### What to do about Motif? */ - lw_add_widget_value_arg (wv, XtNxftFont, (XtArgVal) rf); + lw_add_widget_value_arg (wv, (String) XtNxftFont, (XtArgVal) rf); } #endif
--- a/src/intl-win32.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/intl-win32.c Sun Jan 24 22:04:58 2010 -0600 @@ -85,7 +85,7 @@ struct lang_to_string { int code; - char *string; + const Ascbyte *string; }; struct lang_to_string lang_to_string_table[] =
--- a/src/lisp.h Thu Jan 21 00:46:37 2010 -0600 +++ b/src/lisp.h Sun Jan 24 22:04:58 2010 -0600 @@ -106,6 +106,10 @@ #include <stddef.h> /* offsetof */ #include <sys/types.h> #include <limits.h> +#ifdef __cplusplus +#include <limits> /* necessary for max()/min() under G++ 4 */ +#endif + /* -------------------------- error-checking ------------------------ */ @@ -1261,8 +1265,9 @@ no effects. We keep this abstracted out like this in case we want to change it in the future. */ #define disabled_assert(x) ((void) (x)) -#define disabled_assert_with_message(x, msg) disabled_assert (x) -#define disabled_assert_at_line(x, file, line) disabled_assert (x) +#define disabled_assert_with_message(x, msg) ((void) msg, disabled_assert (x)) +#define disabled_assert_at_line(x, file, line) \ + ((void) file, (void) line, disabled_assert (x)) #ifdef USE_ASSERTIONS # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x)) @@ -1270,18 +1275,14 @@ ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, msg)) # define assert_at_line(x, file, line) \ ((x) ? (void) 0 : assert_failed (file, line, #x)) -#elif defined (DEBUG_XEMACS) -# define assert(x) ((x) ? (void) 0 : (void) ABORT ()) -# define assert_with_message(x, msg) assert (x) -# define assert_at_line(x, file, line) assert (x) #else /* This used to be ((void) (0)) but that triggers lots of unused variable warnings. It's pointless to force all that code to be rewritten, with added ifdefs. Any reasonable compiler will eliminate an expression with no effects. */ -# define assert(x) ((void) (x)) -# define assert_with_message(x, msg) assert (x) -# define assert_at_line(x, file, line) assert (x) +# define assert(x) disabled_assert (x) +# define assert_with_message(x, msg) disabled_assert_with_message (x, msg) +# define assert_at_line(x, file, line) disabled_assert_at_line (x, file, line) #endif /************************************************************************/ @@ -4389,6 +4390,8 @@ DECLARE_DOESNT_RETURN (invalid_byte_code (const CIbyte *reason, Lisp_Object frob)); +extern Lisp_Object Qbyte_code, Qinvalid_byte_code; + /* Defined in callint.c */ EXFUN (Fcall_interactively, 3); EXFUN (Fprefix_numeric_value, 1); @@ -4468,6 +4471,26 @@ Lisp_Object word_to_lisp (unsigned int); unsigned int lisp_to_word (Lisp_Object); +extern Lisp_Object Qarrayp, Qbitp, Qchar_or_string_p, Qcharacterp, + Qerror_conditions, Qerror_message, Qinteger_char_or_marker_p, + Qinteger_or_char_p, Qinteger_or_marker_p, Qlambda, Qlistp, Qnatnump, + Qnonnegativep, Qnumber_char_or_marker_p, Qnumberp, Qquote, Qtrue_list_p; +extern MODULE_API Lisp_Object Qintegerp; + +extern Lisp_Object Qarith_error, Qbeginning_of_buffer, Qbuffer_read_only, + Qcircular_list, Qcircular_property_list, Qconversion_error, + Qcyclic_variable_indirection, Qdomain_error, Qediting_error, + Qend_of_buffer, Qend_of_file, Qerror, Qfile_error, Qinternal_error, + Qinvalid_change, Qinvalid_constant, Qinvalid_function, Qinvalid_operation, + Qinvalid_read_syntax, Qinvalid_state, Qio_error, Qlist_formation_error, + Qmalformed_list, Qmalformed_property_list, Qno_catch, Qout_of_memory, + Qoverflow_error, Qprinting_unreadable_object, Qquit, Qrange_error, + Qsetting_constant, Qsingularity_error, Qstack_overflow, + Qstructure_formation_error, Qtext_conversion_error, Qunderflow_error, + Qvoid_function, Qvoid_variable, Qwrong_number_of_arguments, + Qwrong_type_argument; +extern MODULE_API Lisp_Object Qinvalid_argument, Qsyntax_error; + /* Defined in dired.c */ Lisp_Object make_directory_hash_table (const Ibyte *); Lisp_Object wasteful_word_to_lisp (unsigned int); @@ -5929,62 +5952,31 @@ */ -extern Lisp_Object Qactivate_menubar_hook, Qand_optional, Qand_rest; -extern Lisp_Object Qarith_error, Qarrayp, Qautoload, Qbackground; -extern Lisp_Object Qbackground_pixmap, Qbeginning_of_buffer, Qbitp, Qblinking; -extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only; -extern Lisp_Object Qbyte_code, Qcall_interactively, Qcategory_designator_p; -extern Lisp_Object Qcategory_table_value_p, Qcdr, Qchar_or_string_p; -extern Lisp_Object Qcharacterp, Qcircular_list, Qcircular_property_list; -extern Lisp_Object Qcolor_pixmap_image_instance_p, Qcommandp; -extern Lisp_Object Qcompletion_ignore_case, Qconsole_live_p, Qconst_specifier; -extern Lisp_Object Qconversion_error, Qcurrent_menubar; -extern Lisp_Object Qcyclic_variable_indirection, Qdefun, Qdevice_live_p, Qdim; -extern Lisp_Object Qdirection, Qdisabled, Qdisabled_command_hook; -extern Lisp_Object Qdisplay_table, Qdll_error, Qdomain_error, Qediting_error; -extern Lisp_Object Qend_of_buffer, Qend_of_file, Qend_open, Qerror; -extern Lisp_Object Qerror_conditions, Qerror_lacks_explanatory_string; -extern Lisp_Object Qerror_message, Qevent_live_p, Qexit, Qextent_live_p; -extern Lisp_Object Qexternal_debugging_output, Qfeaturep, Qfile_error; -extern Lisp_Object Qfile_name_sans_extension, Qfinal; -extern Lisp_Object Qforeground, Qformat, Qframe_live_p, Qgraphic; -extern Lisp_Object Qgui_error, Qicon_glyph_p, Qidentity, Qinhibit_quit; -extern Lisp_Object Qinhibit_read_only, Qinteger_char_or_marker_p; -extern Lisp_Object Qinteger_or_char_p, Qinteger_or_marker_p; -extern Lisp_Object Qinteractive, Qinternal_error; -extern Lisp_Object Qinvalid_byte_code, Qinvalid_change, Qinvalid_constant; -extern Lisp_Object Qinvalid_function, Qinvalid_operation; -extern Lisp_Object Qinvalid_read_syntax, Qinvalid_state, Qio_error, Qlambda; -extern Lisp_Object Qlayout, Qlist_formation_error, Qlistp, Qload; -extern Lisp_Object Qlong_name, Qmacro, Qmakunbound, Qmalformed_list; -extern Lisp_Object Qmalformed_property_list, Qmark, Qmodule; -extern Lisp_Object Qmono_pixmap_image_instance_p, Qmouse_leave_buffer_hook; -extern Lisp_Object Qnative_layout, Qnatnump, Qnetwork_error, Qno_catch; -extern Lisp_Object Qnonnegativep, Qnothing_image_instance_p; -extern Lisp_Object Qnumber_char_or_marker_p, Qnumberp, Qout_of_memory; -extern Lisp_Object Qoverflow_error, Qpoint, Qpointer_glyph_p; -extern Lisp_Object Qpointer_image_instance_p, Qprint_length; -extern Lisp_Object Qprint_string_length, Qprinting_unreadable_object; -extern Lisp_Object Qprogn, Qquit, Qquote, Qrange_error; -extern Lisp_Object Qread_char, Qread_from_minibuffer; -extern Lisp_Object Qreally_early_error_handler, Qregion_beginning; -extern Lisp_Object Qregion_end, Qregistries, Qreverse_direction_charset; -extern Lisp_Object Qrun_hooks, Qsans_modifiers, Qsave_buffers_kill_emacs; -extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo, Qsequencep; -extern Lisp_Object Qset, Qsetting_constant, Qshort_name, Qsingularity_error; -extern Lisp_Object Qsound_error, Qstack_overflow, Qstandard_input; -extern Lisp_Object Qstandard_output, Qstart_open, Qstring_lessp; -extern Lisp_Object Qstructure_formation_error, Qsubwindow; -extern Lisp_Object Qsubwindow_image_instance_p; -extern Lisp_Object Qtext_conversion_error, Qtext_image_instance_p, Qtop_level; -extern Lisp_Object Qtrue_list_p, Qunderflow_error, Qunderline; -extern Lisp_Object Quser_files_and_directories, Qvalues; -extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvoid_function; -extern Lisp_Object Qvoid_variable, Qwindow_live_p, Qwrong_number_of_arguments; -extern Lisp_Object Qwrong_type_argument, Qyes_or_no_p; - -extern MODULE_API Lisp_Object Qintegerp, Qinvalid_argument, Qprocess_error; -extern MODULE_API Lisp_Object Qsyntax_error, Qt, Qunbound; +extern Lisp_Object Qactivate_menubar_hook, Qand_optional, Qand_rest, Qautoload, + Qbackground, Qbackground_pixmap, Qblinking, Qbuffer_glyph_p, Qbuffer_live_p, + Qcall_interactively, Qcategory_designator_p, + Qcategory_table_value_p, Qcdr, Qcolor_pixmap_image_instance_p, Qcommandp, + Qcompletion_ignore_case, Qconsole_live_p, Qconst_specifier, Qcurrent_menubar, + Qdefun, Qdevice_live_p, Qdim, Qdirection, Qdisabled, Qdisabled_command_hook, + Qdisplay_table, Qdll_error, Qend_open, Qerror_lacks_explanatory_string, + Qevent_live_p, Qexit, Qextent_live_p, Qexternal_debugging_output, Qfeaturep, + Qfile_error, Qfile_name_sans_extension, Qfinal, Qforeground, Qformat, + Qframe_live_p, Qgraphic, Qgui_error, Qicon_glyph_p, Qidentity, Qinhibit_quit, + Qinhibit_read_only, Qinteractive, Qlayout, Qload, Qlong_name, Qmacro, + Qmakunbound, Qmark, Qmodule, Qmono_pixmap_image_instance_p, + Qmouse_leave_buffer_hook, Qnative_layout, Qnetwork_error, + Qnothing_image_instance_p, Qpoint, Qpointer_glyph_p, + Qpointer_image_instance_p, Qprint_length, Qprint_string_length, Qprogn, + Qread_char, Qread_from_minibuffer, Qreally_early_error_handler, + Qregion_beginning, Qregion_end, Qregistries, Qreverse_direction_charset, + Qrun_hooks, Qsans_modifiers, Qsave_buffers_kill_emacs, Qself_insert_command, + Qself_insert_defer_undo, Qsequencep, Qset, Qshort_name, Qsound_error, + Qstandard_input, Qstandard_output, Qstart_open, Qstring_lessp, Qsubwindow, + Qsubwindow_image_instance_p, Qtext_image_instance_p, Qtop_level, Qunderline, + Quser_files_and_directories, Qvalues, Qvariable_documentation, + Qvariable_domain, Qwindow_live_p, Qyes_or_no_p; + +extern MODULE_API Lisp_Object Qprocess_error, Qt, Qunbound; #define SYMBOL(fou) extern Lisp_Object fou #define SYMBOL_MODULE_API(fou) extern MODULE_API Lisp_Object fou
--- a/src/nas.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/nas.c Sun Jan 24 22:04:58 2010 -0600 @@ -187,7 +187,7 @@ { EMACS_SIGNAL (SIGPIPE, old_sigpipe); start_interrupts (); - return "error in NAS"; + return (Extbyte *) "error in NAS"; } #endif @@ -205,7 +205,7 @@ EMACS_SIGNAL (SIGPIPE, old_sigpipe); #endif if (err_message == NULL) - return "Can't connect to audio server"; + return (Extbyte *) "Can't connect to audio server"; else return err_message; }
--- a/src/number.h Thu Jan 21 00:46:37 2010 -0600 +++ b/src/number.h Sun Jan 24 22:04:58 2010 -0600 @@ -130,8 +130,7 @@ /********************************* Integers *********************************/ -extern Lisp_Object Qintegerp; - +/* Qintegerp in lisp.h */ #define INTEGERP(x) (INTP(x) || BIGNUMP(x)) #define CHECK_INTEGER(x) do { \ if (!INTEGERP (x)) \ @@ -285,7 +284,7 @@ EXFUN (Fbigfloatp, 1); /********************************* Floating *********************************/ -extern Lisp_Object Qfloatingp, Qbigfloat; +extern Lisp_Object Qfloatingp; extern Lisp_Object Qread_default_float_format, Vread_default_float_format; #define FLOATINGP(x) (FLOATP (x) || BIGFLOATP (x)) @@ -319,8 +318,7 @@ /********************************* Numbers **********************************/ -extern Lisp_Object Qnumberp; - +/* Qnumberp in lisp.h */ #define NUMBERP(x) REALP (x) #define CHECK_NUMBER(x) do { \ if (!NUMBERP (x)) \
--- a/src/objects-msw.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/objects-msw.c Sun Jan 24 22:04:58 2010 -0600 @@ -1837,6 +1837,8 @@ hfont = create_hfont_from_font_spec (namestr, hdc, name, device_font_list, errb, &truename); + if (!hfont) + return 0; f->truename = truename; f->data = xnew_and_zero (struct mswindows_font_instance_data); FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0) = hfont;
--- a/src/objects-xlike-inc.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/objects-xlike-inc.c Sun Jan 24 22:04:58 2010 -0600 @@ -327,10 +327,10 @@ struct charset_reporter { Lisp_Object *charset; /* This is a debug facility, require ASCII. */ - Extbyte *language; /* ASCII, please */ + const Ascbyte *language; /* ASCII, please */ /* Technically this is FcChar8, but fsckin' GCC 4 bitches. RFC 3066 is a combination of ISO 639 and ISO 3166. */ - Extbyte *rfc3066; /* ASCII, please */ + const Ascbyte *rfc3066; /* ASCII, please */ }; static struct charset_reporter charset_table[] = @@ -424,7 +424,7 @@ FcPattern *fontxft; /* long-lived, freed at end of this block */ FcResult fcresult; FcConfig *fcc; - FcChar8 *lang = (FcChar8 *) "en"; /* #### fix this bogus hack! */ + const Ascbyte *lang = "en"; FcCharSet *fccs = NULL; DECLARE_EISTRING (eistr_shortname); /* user-friendly nickname */ DECLARE_EISTRING (eistr_longname); /* omit FC_LANG and FC_CHARSET */ @@ -541,15 +541,16 @@ { DECLARE_DEBUG_FONTNAME (name); CHECKING_LANG (0, eidata(name), cr->language); - lang = (FcChar8 *) cr->rfc3066; + lang = cr->rfc3066; } else if (cr->charset) { /* what the hey, build 'em on the fly */ /* #### in the case of error this could return NULL! */ fccs = mule_to_fc_charset (charset); - lang = (FcChar8 *) XSTRING_DATA (XSYMBOL - (XCHARSET_NAME (charset))-> name); + /* #### Bad idea here */ + lang = (const Ascbyte *) XSTRING_DATA (XSYMBOL (XCHARSET_NAME + (charset))->name); } else { @@ -562,7 +563,7 @@ It is why we never fall through to XLFD-checking. */ } - ASSERT_ASCTEXT_ASCII((Extbyte *) lang); + ASSERT_ASCTEXT_ASCII (lang); if (fccs) { @@ -621,7 +622,8 @@ FcTypeOfValueToString (v)); result = Qnil; } - else if (FcLangSetHasLang (v.u.l, lang) != FcLangDifferentLang) + else if (FcLangSetHasLang (v.u.l, (FcChar8 *) lang) + != FcLangDifferentLang) { DECLARE_DEBUG_FONTNAME (name); DEBUG_XFT2 (0, "Xft font %s supports %s\n",
--- a/src/process.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/process.c Sun Jan 24 22:04:58 2010 -0600 @@ -2348,7 +2348,7 @@ */ (var, interactivep)) { - Ibyte *value; + Ibyte *value = NULL; Bytecount valuelen; Lisp_Object v = Qnil; struct gcpro gcpro1;
--- a/src/redisplay-output.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/redisplay-output.c Sun Jan 24 22:04:58 2010 -0600 @@ -422,7 +422,10 @@ else if (start_pos <= bounds.right_out) *next_start = bounds.right_out; else - ABORT (); + { + ABORT (); + *next_start = 0; + } } for (block = 0; block < Dynarr_length (dba); block++)
--- a/src/syswindows.h Thu Jan 21 00:46:37 2010 -0600 +++ b/src/syswindows.h Sun Jan 24 22:04:58 2010 -0600 @@ -1238,7 +1238,7 @@ /* in win32.c */ Extbyte *mswindows_get_module_file_name (void); -void mswindows_output_last_error (char *frob); +void mswindows_output_last_error (const Ascbyte *frob); DECLARE_DOESNT_RETURN (mswindows_report_process_error (const char *string, Lisp_Object data, int errnum));
--- a/src/win32.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/win32.c Sun Jan 24 22:04:58 2010 -0600 @@ -289,7 +289,7 @@ } void -mswindows_output_last_error (char *frob) +mswindows_output_last_error (const Ascbyte *frob) { int errval = GetLastError (); Lisp_Object errmess = mswindows_lisp_error (errval);
--- a/src/window.c Thu Jan 21 00:46:37 2010 -0600 +++ b/src/window.c Sun Jan 24 22:04:58 2010 -0600 @@ -1048,7 +1048,7 @@ } int -window_scrollbar_width (struct window *w) +window_scrollbar_width (struct window * USED_IF_SCROLLBARS (w)) { #ifdef HAVE_SCROLLBARS if (!WINDOW_WIN_P (w) @@ -1067,7 +1067,7 @@ /* Horizontal scrollbars are only active on windows with truncation turned on. */ int -window_scrollbar_height (struct window *w) +window_scrollbar_height (struct window * USED_IF_SCROLLBARS (w)) { #ifdef HAVE_SCROLLBARS if (!WINDOW_WIN_P (w) @@ -1274,7 +1274,8 @@ } static int -window_left_window_gutter_width (struct window *w, int modeline) +window_left_window_gutter_width (struct window *w, + int USED_IF_SCROLLBARS (modeline)) { if (!NILP (w->hchild) || !NILP (w->vchild)) return 0; @@ -1294,7 +1295,8 @@ } static int -window_right_window_gutter_width (struct window *w, int modeline) +window_right_window_gutter_width (struct window *w, + int USED_IF_SCROLLBARS (modeline)) { int gutter = 0;