summaryrefslogtreecommitdiff
path: root/contrib/fixinc/fixincl.c
diff options
context:
space:
mode:
authorkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-28 09:20:28 +0000
committerkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-28 09:20:28 +0000
commit9953708dc35ea54d2fe1061ada83c49cc3085820 (patch)
treef5671f6b06e15d9c07f49579cf0f7a8b173a1275 /contrib/fixinc/fixincl.c
parentdab3b51e8f02cc2541337e767bacc00078a5ad7b (diff)
downloadgcc-9953708dc35ea54d2fe1061ada83c49cc3085820.tar.gz
Added exclusion of C++ files for double slash fix
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20117 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib/fixinc/fixincl.c')
-rw-r--r--contrib/fixinc/fixincl.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/contrib/fixinc/fixincl.c b/contrib/fixinc/fixincl.c
index e10ae7e98ca..62a5892b548 100644
--- a/contrib/fixinc/fixincl.c
+++ b/contrib/fixinc/fixincl.c
@@ -1,5 +1,5 @@
/*
- * $Id: fixincl.c,v 1.1 1998/03/20 16:19:41 korbb Exp $
+ * $Id: fixincl.c,v 1.4 1998/08/05 10:20:11 korbb Exp $
*
* Install modified versions of certain ANSI-incompatible system header
* files which are fixed to work correctly with ANSI C and placed in a
@@ -28,7 +28,6 @@
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <sys/stropts.h>
#include <sys/wait.h>
#include <signal.h>
#include <stdio.h>
@@ -36,8 +35,6 @@
#include <stdlib.h>
#include <errno.h>
#include <string.h>
-#include <stropts.h>
-#include <poll.h>
#include <fcntl.h>
#include <ctype.h>
@@ -138,7 +135,7 @@ main (argc, argv)
if (strcmp (argv[1], "-v") == 0)
{
- fputs ("$Id: fixincl.c,v 1.1 1998/03/20 16:19:41 korbb Exp $\n", stderr);
+ fputs ("$Id: fixincl.c,v 1.3 1998/06/02 07:00:12 korbb Exp $\n", stderr);
exit (EXIT_SUCCESS);
}
@@ -448,17 +445,18 @@ createFile (pzFile)
}
tSuccess
-testTest (pTest)
+testTest (pTest, pzFile)
tTestDesc *pTest;
+ char* pzFile;
{
char *pzRes;
tSuccess res = FAILURE;
static char zCmdBuf[4096];
- tSCC zCmdFmt[] = "if ( test %s ) > /dev/null 2>&1\n"
+ tSCC zCmdFmt[] = "f=%s\nif ( test %s ) > /dev/null 2>&1\n"
"then echo TRUE\n" "else echo FALSE\n" "fi";
- sprintf (zCmdBuf, zCmdFmt, pTest->pzTest);
+ sprintf (zCmdBuf, zCmdFmt, pzFile, pTest->pzTest);
pzRes = runShell (zCmdBuf);
if (*pzRes == 'T')
res = SUCCESS;
@@ -643,7 +641,7 @@ process (pzDta, pzDir, pzFile)
* IF *any* of the shell tests fail,
* THEN do not process the fix.
*/
- if (!SUCCESSFUL (testTest (pTD)))
+ if (!SUCCESSFUL (testTest (pTD, pzFile)))
goto nextFix;
break;