rbb 99/06/08 08:35:29
Modified: apr/test testfile.dsp testproc.c Added: apr/test testproc.dsp Log: New project file for testproc, and a minor change to testproc. I will test this on Unix in a few minutes. Revision Changes Path 1.2 +3 -2 apache-apr/apr/test/testfile.dsp Index: testfile.dsp =================================================================== RCS file: /home/cvs/apache-apr/apr/test/testfile.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- testfile.dsp 1999/06/03 19:43:56 1.1 +++ testfile.dsp 1999/06/08 15:35:24 1.2 @@ -39,6 +39,7 @@ # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c @@ -49,7 +50,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 ..\file_io\win32\Debug\file_io.lib ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 !ELSEIF "$(CFG)" == "testfile - Win32 Debug" @@ -73,7 +74,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\file_io\win32\Debug\file_io.lib ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF 1.10 +10 -7 apache-apr/apr/test/testproc.c Index: testproc.c =================================================================== RCS file: /home/cvs/apache-apr/apr/test/testproc.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- testproc.c 1999/06/02 18:44:56 1.9 +++ testproc.c 1999/06/08 15:35:25 1.10 @@ -58,7 +58,9 @@ #include "apr_general.h" #include "apr_lib.h" #include "errno.h" +#ifndef WIN32 #include <unistd.h> +#endif #include <stdio.h> #include <signal.h> #include <string.h> @@ -71,19 +73,18 @@ ap_context_t *context; ap_proc_t *newproc; ap_procattr_t *attr; - ap_file_t *testfile, *f2; - ap_ssize_t rv, length; - ap_status_t stat; + ap_file_t *testfile; + ap_ssize_t length; char *buf; char *args[3]; - char *teststr; + char *teststr; ap_create_context(NULL, NULL, &context); - teststr = ap_pstrdup(context, "Whooo Hoooo\n"); + teststr = ap_pstrdup(context, "Whooo Hoooo\0"); if (argc > 1) { - fprintf(stdout, "%s", teststr); + fprintf(stdout, "%s", teststr); exit(1); } fprintf(stdout, "Creating procattr......."); @@ -134,12 +135,14 @@ length = 256; fprintf(stdout, "Checking the data read from pipe to child......."); - buf = ap_palloc(context, length); + buf = ap_pcalloc(context, length); if (ap_read(testfile, buf, &length) == APR_SUCCESS) { if (!strcmp(buf, teststr)) fprintf(stdout,"OK\n"); else fprintf(stderr, "Uh-Oh\n"); } else fprintf(stderr, "Read failed.\n"); + + return(1); } 1.1 apache-apr/apr/test/testproc.dsp Index: testproc.dsp =================================================================== # Microsoft Developer Studio Project File - Name="testproc" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=testproc - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "testproc.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "testproc.mak" CFG="testproc - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "testproc - Win32 Release" (based on\ "Win32 (x86) Console Application") !MESSAGE "testproc - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "testproc - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /GX /O2 /I "..\include" /I "..\..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\file_io\win32\Debug\file_io.lib ..\threadproc\win32\Debug\threadproc.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "testproc - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "testproc" # PROP BASE Intermediate_Dir "testproc" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "testproc" # PROP Intermediate_Dir "testproc" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\include" /I "..\..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "testproc - Win32 Release" # Name "testproc - Win32 Debug" # Begin Source File SOURCE=.\testproc.c # End Source File # End Target # End Project