]> code.delx.au - gnu-emacs/blobdiff - src/unexcoff.c
Ibuffer change marks
[gnu-emacs] / src / unexcoff.c
index 0cb72d9dcd2a21d4b10ed446aa979d4c7db7b3ec..6a083803a71b9a2149ae8367eb58b30f1acd2768 100644 (file)
@@ -1,12 +1,12 @@
-/* Copyright (C) 1985-1988, 1992-1994, 2001-2015 Free Software
+/* Copyright (C) 1985-1988, 1992-1994, 2001-2016 Free Software
  * Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -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>
@@ -122,7 +121,7 @@ static int pagemask;
    into an int which is the number of a byte.
    This is a no-op on ordinary machines, but not on all.  */
 
-#define ADDR_CORRECT(x) ((char *)(x) - (char*)0)
+#define ADDR_CORRECT(x) ((char *) (x) - (char *) 0)
 
 #include "lisp.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 */