diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2012-02-10 13:28:12 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2012-02-10 13:28:12 +0200 |
commit | 715956735ebfc71820332a214e11bcf30c4b69c7 (patch) | |
tree | e0028c672d70d309ca06696365ad08a3aa160ff9 | |
parent | ac3a3b5a09051f68ec1d521cfe1e39f44cb0a07a (diff) | |
download | egawk-715956735ebfc71820332a214e11bcf30c4b69c7.tar.gz egawk-715956735ebfc71820332a214e11bcf30c4b69c7.tar.bz2 egawk-715956735ebfc71820332a214e11bcf30c4b69c7.zip |
DJGPP fix for dgawk (substitute version of execvp).
-rw-r--r-- | pc/ChangeLog | 5 | ||||
-rw-r--r-- | pc/gawkmisc.pc | 15 |
2 files changed, 19 insertions, 1 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog index 72d5a68f..ee9deca2 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,8 @@ +2012-02-10 Arnold D. Robbins <arnold@skeeve.com> + + * gawkmisc.pc (execvp): New function based on code from Eli + Zaretskii to make dgawk's restarting the debugger work. + 2012-01-27 Scott Deifik <scottd.mail@sbcglobal.net> * Makefile.tst: Sync with mainline version. diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc index 64b42396..cb49dcca 100644 --- a/pc/gawkmisc.pc +++ b/pc/gawkmisc.pc @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991 - 2003 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991 - 2003, 2012 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Progamming Language. @@ -569,6 +569,19 @@ wctob (wint_t wc) return EOF; } +/* + * On MS-Windows, execvp causes the shell and the re-exec'ed + * dgawk to compete for the keyboard input. + * + * This will need work if we ever need a real version of execvp. + */ +int execvp(const char *file, char *const argv[]) +{ + if (_spawnvp(_P_WAIT, file, (const char * const *)argv) != -1) + exit(EXIT_SUCCESS); + + return 0; +} #endif /* __MINGW32__ */ #ifdef __DJGPP__ |