summaryrefslogtreecommitdiff
path: root/fixincludes/fixincl.c
diff options
context:
space:
mode:
authorAaron W. LaFramboise <aaronavay62@aaronwl.com>2004-10-20 02:21:09 -0600
committerAaron W. LaFramboise <aaronwl@gcc.gnu.org>2004-10-20 02:21:09 -0600
commitf4a8f2791cdea5aa417884db3e7da0310babc848 (patch)
treeb61be9e61931a736e008e95859adbf4a9d604d94 /fixincludes/fixincl.c
parentd65c67104ff031bc0cfb067af4959e9ad9bed2a0 (diff)
downloadgcc-f4a8f2791cdea5aa417884db3e7da0310babc848.tar.gz
re PR bootstrap/17832 (Bootstrap broken by fixincludes failures)
PR bootstrap/17832 * fixincl.c (SIGCHLD): Remove definition. (initialize): Remove SIGIOT and SIGPIPE checks. (create_file): Fix mkdir() for Win32. (internal_fix): Use dup2() instead of fcntl(). * fixlib.h (SIGQUIT): Define if undefined. (SIGIOT): Same. (SIGPIPE): Same. (SIGALRM): Same. (SIGKILL): Same. * procopen.c (chain_open): Use dup2() instead of fcntl(). From-SVN: r89326
Diffstat (limited to 'fixincludes/fixincl.c')
-rw-r--r--fixincludes/fixincl.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c
index a153a777a54..243f9bbfd10 100644
--- a/fixincludes/fixincl.c
+++ b/fixincludes/fixincl.c
@@ -30,9 +30,6 @@ Boston, MA 02111-1307, USA. */
#define BAD_ADDR ((void*)-1)
#endif
-#if ! defined( SIGCHLD ) && defined( SIGCLD )
-# define SIGCHLD SIGCLD
-#endif
#ifndef SEPARATE_FIX_PROC
#include "server.h"
#endif
@@ -291,12 +288,8 @@ initialize ( int argc, char** argv )
# endif
signal (SIGQUIT, SIG_IGN);
-#ifdef SIGIOT
signal (SIGIOT, SIG_IGN);
-#endif
-#ifdef SIGPIPE
signal (SIGPIPE, SIG_IGN);
-#endif
signal (SIGALRM, SIG_IGN);
signal (SIGTERM, SIG_IGN);
}
@@ -552,7 +545,11 @@ create_file (void)
*pz_dir = NUL;
if (stat (fname, &stbf) < 0)
{
+#ifdef _WIN32
+ mkdir (fname);
+#else
mkdir (fname, S_IFDIR | S_DIRALL);
+#endif
}
*pz_dir = '/';
@@ -835,8 +832,8 @@ internal_fix (int read_fd, tFixDesc* p_fixd)
* Make the fd passed in the stdin, and the write end of
* the new pipe become the stdout.
*/
- fcntl (fd[1], F_DUPFD, STDOUT_FILENO);
- fcntl (read_fd, F_DUPFD, STDIN_FILENO);
+ dup2 (fd[1], STDOUT_FILENO);
+ dup2 (read_fd, STDIN_FILENO);
apply_fix (p_fixd, pz_curr_file);
exit (0);