diff src/alloc.c @ 28:1917ad0d78d7 r19-15b97

Import from CVS: tag r19-15b97
author cvs
date Mon, 13 Aug 2007 08:51:55 +0200
parents 441bb1e64a06
children ec9a17fef872
line wrap: on
line diff
--- a/src/alloc.c	Mon Aug 13 08:51:34 2007 +0200
+++ b/src/alloc.c	Mon Aug 13 08:51:55 2007 +0200
@@ -2576,18 +2576,19 @@
 PURESIZE_h(long int puresize)
 {
   int fd;
-  char *PURESIZE_h_file = "PURESIZE.h";
+  char *PURESIZE_h_file = "puresize_adjust.h";
   char *WARNING = "/* This file is generated by XEmacs, DO NOT MODIFY!!! */\n";
   char define_PURESIZE[256];
 
-  if ((fd = open(PURESIZE_h_file, O_WRONLY|O_CREAT)) < 0) {
-    report_file_error("Can't write PURESIZE",
+  if ((fd = open(PURESIZE_h_file, O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0) {
+    report_file_error("Can't write PURESIZE_ADJUSTMENT",
 		      Fcons(build_ext_string(PURESIZE_h_file, FORMAT_FILENAME),
 			    Qnil));
   }
 
   write(fd, WARNING, strlen(WARNING));
-  sprintf(define_PURESIZE, "# define PURESIZE %ld\n", puresize);
+  sprintf(define_PURESIZE, "# define PURESIZE_ADJUSTMENT %ld\n",
+	  puresize - RAW_PURESIZE);
   write(fd, define_PURESIZE, strlen(define_PURESIZE));
   close(fd);
 }