diff lib-src/make-dump-id.c @ 1688:034a2ddf5b6b

[xemacs-hg @ 2003-09-16 03:57:54 by james] Fix C++ build of dump-id.c, and remove dumper.h/lrecord.h duplication.
author james
date Tue, 16 Sep 2003 03:57:59 +0000
parents 8bae4d6cdd10
children 04bc9d2f42c7
line wrap: on
line diff
--- 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)