# HG changeset patch # User james # Date 1063684679 0 # Node ID 034a2ddf5b6b842ec58ab282d5308f096f20d57c # Parent a4b5e2effaff77e313d8a4444c44ddd014ea518d [xemacs-hg @ 2003-09-16 03:57:54 by james] Fix C++ build of dump-id.c, and remove dumper.h/lrecord.h duplication. diff -r a4b5e2effaff -r 034a2ddf5b6b lib-src/ChangeLog --- a/lib-src/ChangeLog Mon Sep 15 22:04:10 2003 +0000 +++ b/lib-src/ChangeLog Tue Sep 16 03:57:59 2003 +0000 @@ -1,3 +1,8 @@ +2003-09-15 Jerry James + + * make-dump-id.c (main): Output separate declaration and + definition for dump_id. + 2003-09-03 Steve Youngs * XEmacs 21.5.15 "celery" is released. diff -r a4b5e2effaff -r 034a2ddf5b6b lib-src/make-dump-id.c --- a/lib-src/make-dump-id.c Mon Sep 15 22:04:10 2003 +0000 +++ b/lib-src/make-dump-id.c Tue Sep 16 03:57:59 2003 +0000 @@ -64,10 +64,12 @@ return EXIT_FAILURE; } - /* dump_id is declared as extern "C" in lrecord.h */ - fprintf (f, "#if defined (__cplusplus)\n"); - fprintf (f, "extern \"C\"\n"); - fprintf (f, "#endif /* __cplusplus */\n"); + /* dump_id is declared as extern "C" in dumper.h */ + fputs ("extern\n", f); + fputs ("#ifdef __cplusplus\n", f); + fputs ("\"C\"\n", f); + fputs ("#endif\n", f); + fputs ("unsigned int dump_id;\n", f); fprintf (f, "unsigned int dump_id = %uU;\n", generate_dump_id ()); if ((fclose (f)) != 0) diff -r a4b5e2effaff -r 034a2ddf5b6b src/ChangeLog --- a/src/ChangeLog Mon Sep 15 22:04:10 2003 +0000 +++ b/src/ChangeLog Tue Sep 16 03:57:59 2003 +0000 @@ -1,3 +1,10 @@ +2003-09-15 Jerry James + + * depend: Regenerate. + * dumper.h: Use extern "C" for C++ builds. + * lrecord.h: Remove duplicated material from dumper.h and include + that instead. + 2003-09-15 Jerry James * event-msw.c (debug_mswin_messages): Conditionally compile diff -r a4b5e2effaff -r 034a2ddf5b6b src/depend --- a/src/depend Mon Sep 15 22:04:10 2003 +0000 +++ b/src/depend Tue Sep 16 03:57:59 2003 +0000 @@ -11,7 +11,7 @@ LISP_H= #else CONFIG_H=config.h -LISP_H=lisp.h config.h general-slots.h lrecord.h symeval.h symsinit.h text.h $(LISP_UNION_H) +LISP_H=lisp.h config.h dumper.h general-slots.h lrecord.h symeval.h symsinit.h text.h $(LISP_UNION_H) #endif #if defined(HAVE_MS_WINDOWS) diff -r a4b5e2effaff -r 034a2ddf5b6b src/dumper.h --- a/src/dumper.h Mon Sep 15 22:04:10 2003 +0000 +++ b/src/dumper.h Tue Sep 16 03:57:59 2003 +0000 @@ -23,9 +23,19 @@ #ifndef INCLUDED_dumper_h #define INCLUDED_dumper_h +#ifdef __cplusplus +extern "C" { +#endif + void pdump_objects_unmark (void); void pdump (void); int pdump_load (const char *argv0); +void pdump_backtrace (void); extern unsigned int dump_id; +extern char *pdump_start, *pdump_end; + +#ifdef __cplusplus +} +#endif #endif /* INCLUDED_dumper_h */ diff -r a4b5e2effaff -r 034a2ddf5b6b src/lrecord.h --- a/src/lrecord.h Mon Sep 15 22:04:10 2003 +0000 +++ b/src/lrecord.h Tue Sep 16 03:57:59 2003 +0000 @@ -1510,14 +1510,7 @@ extern MODULE_API int initialized; #ifdef PDUMP - -void pdump_objects_unmark (void); -void pdump (void); -int pdump_load (const char *argv0); -void pdump_backtrace (void); -extern unsigned int dump_id; -extern char *pdump_start, *pdump_end; - +#include "dumper.h" #define DUMPEDP(adr) ((((char *) (adr)) < pdump_end) && \ (((char *) (adr)) >= pdump_start)) #else