comparison 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
comparison
equal deleted inserted replaced
1687:a4b5e2effaff 1688:034a2ddf5b6b
62 { 62 {
63 perror ("open dump-id.c"); 63 perror ("open dump-id.c");
64 return EXIT_FAILURE; 64 return EXIT_FAILURE;
65 } 65 }
66 66
67 /* dump_id is declared as extern "C" in lrecord.h */ 67 /* dump_id is declared as extern "C" in dumper.h */
68 fprintf (f, "#if defined (__cplusplus)\n"); 68 fputs ("extern\n", f);
69 fprintf (f, "extern \"C\"\n"); 69 fputs ("#ifdef __cplusplus\n", f);
70 fprintf (f, "#endif /* __cplusplus */\n"); 70 fputs ("\"C\"\n", f);
71 fputs ("#endif\n", f);
72 fputs ("unsigned int dump_id;\n", f);
71 fprintf (f, "unsigned int dump_id = %uU;\n", generate_dump_id ()); 73 fprintf (f, "unsigned int dump_id = %uU;\n", generate_dump_id ());
72 74
73 if ((fclose (f)) != 0) 75 if ((fclose (f)) != 0)
74 { 76 {
75 perror ("close dump-id.c"); 77 perror ("close dump-id.c");