comparison src/Makefile.in.in @ 851:e7ee5f8bde58

[xemacs-hg @ 2002-05-23 11:46:08 by ben] fix for raymond toy's crash, alloca crashes, some recover-session improvements files.el: Recover-session improvements: Only show session files where some files can actually be recovered, and show in chronological order. subr.el, menubar-items.el: As promised to rms, the functionality in truncate-string-with-continuation-dots has been merged into truncate-string-to-width. Change callers in menubar-items.el. select.el: Document some of these funs better. Fix problem where we were doing own-clipboard twice. Makefile.in.in: Add alloca.o. Ensure that alloca.s doesn't compile into alloca.o, but allocax.o (not that it's currently used or anything.) EmacsFrame.c, abbrev.c, alloc.c, alloca.c, callint.c, callproc.c, config.h.in, device-msw.c, device-x.c, dired.c, doc.c, editfns.c, emacs.c, emodules.c, eval.c, event-Xt.c, event-msw.c, event-stream.c, file-coding.c, fileio.c, filelock.c, fns.c, glyphs-gtk.c, glyphs-msw.c, glyphs-x.c, gui-x.c, input-method-xlib.c, intl-win32.c, lisp.h, lread.c, menubar-gtk.c, menubar-msw.c, menubar.c, mule-wnnfns.c, nt.c, objects-msw.c, process-nt.c, realpath.c, redisplay-gtk.c, redisplay-output.c, redisplay-x.c, redisplay.c, search.c, select-msw.c, sysdep.c, syswindows.h, text.c, text.h, ui-byhand.c: Fix Raymond Toy's crash. Repeat to self: 2^21 - 1 is NOT the same as (2 << 21) - 1. Fix crashes due to excessive alloca(). replace alloca() with ALLOCA(), which calls the C alloca() [which uses xmalloc()] when the size is too big. Insert in various places calls to try to flush the C alloca() stored info if there is any. Add MALLOC_OR_ALLOCA(), for places that expect to be alloca()ing large blocks. This xmalloc()s when too large and records an unwind-protect to free -- relying on the caller to unbind_to() elsewhere in the function. Use it in concat(). Use MALLOC instead of ALLOCA in select-msw.c. xemacs.mak: Add alloca.o.
author ben
date Thu, 23 May 2002 11:46:46 +0000
parents 6728e641994e
children 2b6fa2618f76
comparison
equal deleted inserted replaced
850:f915ad7befaf 851:e7ee5f8bde58
305 305
306 ## NOTE: The last line cannot be all macros, because make will barf 306 ## NOTE: The last line cannot be all macros, because make will barf
307 ## if they all come out null. 307 ## if they all come out null.
308 308
309 objs=\ 309 objs=\
310 abbrev.o alloc.o $(balloon_help_objs) blocktype.o buffer.o bytecode.o\ 310 abbrev.o alloc.o alloca.o \
311 callint.o callproc.o casefiddle.o casetab.o chartab.o $(clash_detection_objs)\ 311 $(balloon_help_objs) blocktype.o buffer.o bytecode.o \
312 cmdloop.o cmds.o $(coding_system_objs) console.o console-stream.o\ 312 callint.o callproc.o casefiddle.o casetab.o chartab.o \
313 $(clash_detection_objs) cmdloop.o cmds.o $(coding_system_objs) console.o \
314 console-stream.o\
313 data.o $(database_objs) $(debug_objs) device.o dired.o doc.o doprnt.o\ 315 data.o $(database_objs) $(debug_objs) device.o dired.o doc.o doprnt.o\
314 dynarr.o\ 316 dynarr.o \
315 editfns.o elhash.o emacs.o eval.o events.o\ 317 editfns.o elhash.o emacs.o eval.o events.o\
316 event-stream.o $(event_unixoid_objs) $(extra_objs) extents.o\ 318 event-stream.o $(event_unixoid_objs) $(extra_objs) extents.o\
317 faces.o file-coding.o fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o \ 319 faces.o file-coding.o fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o \
318 font-lock.o frame.o\ 320 font-lock.o frame.o\
319 general.o $(gif_objs) glyphs.o glyphs-eimage.o glyphs-shared.o\ 321 general.o $(gif_objs) glyphs.o glyphs-eimage.o glyphs-shared.o\
792 ## Some machines have alloca built-in. 794 ## Some machines have alloca built-in.
793 ## They should define HAVE_ALLOCA, or may just let alloca.s 795 ## They should define HAVE_ALLOCA, or may just let alloca.s
794 ## be used but generate no code. 796 ## be used but generate no code.
795 ## Some have it written in assembler in alloca.s. 797 ## Some have it written in assembler in alloca.s.
796 ## Some use the C version in alloca.c (these define C_ALLOCA in config.h). 798 ## Some use the C version in alloca.c (these define C_ALLOCA in config.h).
797 799 ## Nowadays we always compile in the C version and use it to avoid stack
800 ## overflow.
798 801
799 #ifdef C_ALLOCA 802 #ifdef C_ALLOCA
800 ## We could put something in alloca.c to #define free and malloc
801 ## whenever emacs was #defined, but that's not appropriate for all
802 ## users of alloca in Emacs. Check out ../lib-src/getopt.c. */
803
804 alloca.o : ${srcdir}/alloca.c
805 $(CC) -c -Dfree=xfree -Dmalloc=xmalloc $(cflags) ${srcdir}/alloca.c
806 #else 803 #else
807 #ifndef HAVE_ALLOCA 804 #ifndef HAVE_ALLOCA
808 alloca.o : ${srcdir}/alloca.s config.h 805 allocax.o : ${srcdir}/alloca.s config.h
809 ## $(CPP) is cc -E, which may get confused by filenames 806 ## $(CPP) is cc -E, which may get confused by filenames
810 ## that do not end in .c. So copy file to a safe name. */ 807 ## that do not end in .c. So copy file to a safe name. */
811 ## cp ${srcdir}/alloca.s allocatem.c 808 ## cp ${srcdir}/alloca.s allocatem.c
812 ## Remove any ^L, blank lines, and preprocessor comments, 809 ## Remove any ^L, blank lines, and preprocessor comments,
813 ## since some assemblers barf on them. Use a different basename for the 810 ## since some assemblers barf on them. Use a different basename for the
817 sed -e 's/ //' -e 's/^#.*//' | \ 814 sed -e 's/ //' -e 's/^#.*//' | \
818 sed -n -e '/^..*$$/p' > allocax.s 815 sed -n -e '/^..*$$/p' > allocax.s
819 @$(RM) alloca.o 816 @$(RM) alloca.o
820 ## Xenix, in particular, needs to run assembler via cc. 817 ## Xenix, in particular, needs to run assembler via cc.
821 $(CC) -c allocax.s 818 $(CC) -c allocax.s
822 mv allocax.o alloca.o
823 $(RM) allocax.s allocatem.c 819 $(RM) allocax.s allocatem.c
824 #endif /* HAVE_ALLOCA */ 820 #endif /* HAVE_ALLOCA */
825 #endif /* ! defined (C_ALLOCA) */ 821 #endif /* ! defined (C_ALLOCA) */
826 822
827 #ifdef HAVE_NATIVE_SOUND 823 #ifdef HAVE_NATIVE_SOUND