]> code.delx.au - gnu-emacs/blobdiff - src/unexcoff.c
Merge from origin/emacs-25
[gnu-emacs] / src / unexcoff.c
index 0e47bdd86562dd7d791867cb46c4b4fce75389ff..cc0df306525f4c81d996e51e563462ca246d7190 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1985-1988, 1992-1994, 2001-2014 Free Software
+/* Copyright (C) 1985-1988, 1992-1994, 2001-2016 Free Software
  * Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -97,7 +97,6 @@ struct aouthdr
 #include <sys/types.h>
 #endif /* makedev */
 #include <stdio.h>
-#include <sys/stat.h>
 #include <errno.h>
 
 #include <sys/file.h>
@@ -439,29 +438,6 @@ copy_sym (int new, int a_out, const char *a_name, const char *new_name)
   return 0;
 }
 \f
-/* ****************************************************************
- * mark_x
- *
- * After successfully building the new a.out, mark it executable
- */
-static void
-mark_x (const char *name)
-{
-  struct stat sbuf;
-  int um;
-  int new = 0;  /* for PERROR */
-
-  um = umask (777);
-  umask (um);
-  if (stat (name, &sbuf) == -1)
-    {
-      PERROR (name);
-    }
-  sbuf.st_mode |= 0111 & ~um;
-  if (chmod (name, sbuf.st_mode) == -1)
-    PERROR (name);
-}
-\f
 
 /*
  *     If the COFF file contains a symbol table and a line number section,
@@ -542,7 +518,7 @@ unexec (const char *new_name, const char *a_name)
     {
       PERROR (a_name);
     }
-  if ((new = emacs_open (new_name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
+  if ((new = emacs_open (new_name, O_WRONLY | O_CREAT | O_TRUNC, 0777)) < 0)
     {
       PERROR (new_name);
     }
@@ -560,7 +536,6 @@ unexec (const char *new_name, const char *a_name)
   emacs_close (new);
   if (a_out >= 0)
     emacs_close (a_out);
-  mark_x (new_name);
 }
 
 #endif /* not CANNOT_DUMP */