]> code.delx.au - gnu-emacs/blobdiff - src/sysdep.c
Remove build system name from deterministic dumps
[gnu-emacs] / src / sysdep.c
index 418c50d5e78e907a70f4b00fb8d9de11b40c12bf..b01c64d52ac6c86897487a45f76fc753b8add2a1 100644 (file)
@@ -1408,6 +1408,13 @@ setup_pty (int fd)
 void
 init_system_name (void)
 {
+  if (DETERMINISTIC_DUMP && (might_dump || ! NILP (Vpurify_flag)))
+    {
+      /* If we're dumping, set the hostname to a literal so that the
+         dump is deterministic.  */
+      Vsystem_name = build_pure_c_string ("elided");
+      return;
+    }
   char *hostname_alloc = NULL;
   char *hostname;
 #ifndef HAVE_GETHOSTNAME