version 1.1, 1993/03/21 09:45:37 |
version 1.2, 1993/03/21 18:04:42 |
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
|
* |
|
* PATCHES MAGIC LEVEL PATCH THAT GOT US HERE |
|
* -------------------- ----- ---------------------- |
|
* CURRENT PATCH LEVEL: 1 00039 |
|
* -------------------- ----- ---------------------- |
|
* |
|
* 10 Aug 92 David Dawes Fixed "remove directory" bug |
*/ |
*/ |
|
|
#ifndef lint |
#ifndef lint |
Line 59 static char sccsid[] = "@(#)compat.c 5.7 |
|
Line 66 static char sccsid[] = "@(#)compat.c 5.7 |
|
#include <sys/wait.h> |
#include <sys/wait.h> |
#include <sys/errno.h> |
#include <sys/errno.h> |
#include <ctype.h> |
#include <ctype.h> |
|
#include <sys/stat.h> /* 10 Aug 92*/ |
#include "make.h" |
#include "make.h" |
extern int errno; |
extern int errno; |
|
|
Line 80 static int CompatRunCommand(); |
|
Line 88 static int CompatRunCommand(); |
|
* CompatInterrupt -- |
* CompatInterrupt -- |
* Interrupt the creation of the current target and remove it if |
* Interrupt the creation of the current target and remove it if |
* it ain't precious. |
* it ain't precious. |
|
* Don't unlink it if it is a directory XXX 10 Aug 92 |
* |
* |
* Results: |
* Results: |
* None. |
* None. |
Line 95 CompatInterrupt (signo) |
|
Line 104 CompatInterrupt (signo) |
|
int signo; |
int signo; |
{ |
{ |
GNode *gn; |
GNode *gn; |
|
struct stat sbuf; /* 10 Aug 92*/ |
|
|
if ((curTarg != NILGNODE) && !Targ_Precious (curTarg)) { |
if ((curTarg != NILGNODE) && !Targ_Precious (curTarg)) { |
char *file = Var_Value (TARGET, curTarg); |
char *file = Var_Value (TARGET, curTarg); |
|
|
if (unlink (file) == SUCCESS) { |
stat (file, &sbuf); |
printf ("*** %s removed\n", file); |
if (!(sbuf.st_mode & S_IFDIR)) { |
|
if (unlink (file) == SUCCESS) { |
|
printf ("*** %s removed\n", file); |
|
} |
} |
} |
|
|
/* |
/* |