-/* 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
#include <sys/types.h>
#endif /* makedev */
#include <stdio.h>
-#include <sys/stat.h>
#include <errno.h>
#include <sys/file.h>
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"
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,
{
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);
}
emacs_close (new);
if (a_out >= 0)
emacs_close (a_out);
- mark_x (new_name);
}
#endif /* not CANNOT_DUMP */