From 8b8c3d1065d2168f28abc8e02dfd7ac7c73ae515 Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Fri, 24 Jan 2003 19:49:01 +0000 Subject: [PATCH] * src/spawn.c: removed * src/spawn.h: removed git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2174 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 2 ++ src/spawn.c | 70 ----------------------------------------------------- src/spawn.h | 13 ---------- 3 files changed, 2 insertions(+), 83 deletions(-) delete mode 100644 src/spawn.c delete mode 100644 src/spawn.h diff --git a/ChangeLog b/ChangeLog index 38fdafd3..8cd2af3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ * src/Makefile.in: remove spawn.o * src/SDCCmain.c: remove spawn.h * src/SDCCmain.c (printVersionInfo): report MINGW32 instead of UNIX + * src/spawn.c: removed + * src/spawn.h: removed 2003-01-24 diff --git a/src/spawn.c b/src/spawn.c deleted file mode 100644 index 3c85169e..00000000 --- a/src/spawn.c +++ /dev/null @@ -1,70 +0,0 @@ -/**[txh]******************************************************************** - - Module: Spawn replacement for UNIXes - Description: - This module provides spawnv and spawnvp functions for UNIX.@* - Copyright 1999 by Salvador E. Tropea. You can use it under the terms of -the GPL license. e-mail: salvador@inti.gov.ar, set@computer.org - - Include: spawn.h - -***************************************************************************/ - -#ifndef __DJGPP__ -#ifndef __MINGW32__ - -#include -#include -#include "spawn.h" - -/**[txh]******************************************************************** - - Description: - That's a replacement for the DOS spawnv function which was POSIX during -the drafts but then was removed. It avoids the need of the fork/exec/wait -sequence which doesn't work for djgpp. - -***************************************************************************/ - -int -spawnv (int mode, const char *path, char *const argv[]) -{ - int pStatus; - - if (mode == P_OVERLAY) - return execv (path, argv); - if (!fork ()) - { - if (execv (path, argv)) - return -1; - } - if (mode == P_WAIT) - wait (&pStatus); - return 0; -} - -/**[txh]******************************************************************** - - Description: - Same as spawnv but using execvp. @x{spawnv}. - -***************************************************************************/ - -int -spawnvp (int mode, const char *path, char *const argv[]) -{ - int pStatus; - - if (mode == P_OVERLAY) - return execv (path, argv); - if (!fork ()) - { - if (execvp (path, argv)) - return -1; - } - if (mode == P_WAIT) - wait (&pStatus); - return 0; -} -#endif -#endif diff --git a/src/spawn.h b/src/spawn.h deleted file mode 100644 index 3e700dc5..00000000 --- a/src/spawn.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifdef __DJGPP__ -/* They exist in DOS */ -#include -#else -/* Specially defined for UNIX and Cygwin */ -int spawnv (int mode, const char *path, char *const argv[]); -int spawnvp (int mode, const char *path, char *const argv[]); - -#define P_WAIT 1 -#define P_NOWAIT 2 /* always generates error for DJGPP! */ -#define P_OVERLAY 3 - -#endif -- 2.30.2