rbb 99/06/17 11:56:24
Modified: apr/misc/win32 timetest.c apr/test client.dsp server.dsp test.dsw testfile.dsp testproc.dsp testsock.dsp testtime.c Added: apr/test timetest.dsp apr/time/win32 access.c atime.h time.c time.def time.dsp Log: First pass at Windows Time functions. Revision Changes Path 1.2 +1 -1 apache-apr/apr/misc/win32/timetest.c Index: timetest.c =================================================================== RCS file: /home/cvs/apache-apr/apr/misc/win32/timetest.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- timetest.c 1999/06/01 19:29:00 1.1 +++ timetest.c 1999/06/17 18:56:05 1.2 @@ -1,4 +1,4 @@ - +2 #include <windows.h> #include <time.h> #include <stdio.h> 1.2 +2 -2 apache-apr/apr/test/client.dsp Index: client.dsp =================================================================== RCS file: /home/cvs/apache-apr/apr/test/client.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- client.dsp 1999/06/15 17:43:22 1.1 +++ client.dsp 1999/06/17 18:56:08 1.2 @@ -49,7 +49,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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\network_io\win32\Debug\network_io.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 ..\network_io\win32\Debug\network_io.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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\time\win32\Debug\time.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "client - Win32 Debug" @@ -73,7 +73,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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\network_io\win32\Debug\network_io.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ..\network_io\win32\Debug\network_io.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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\time\win32\Debug\time.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF 1.2 +2 -2 apache-apr/apr/test/server.dsp Index: server.dsp =================================================================== RCS file: /home/cvs/apache-apr/apr/test/server.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- server.dsp 1999/06/15 17:43:23 1.1 +++ server.dsp 1999/06/17 18:56:09 1.2 @@ -49,7 +49,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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\network_io\win32\Debug\network_io.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 ..\network_io\win32\Debug\network_io.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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\time\win32\Debug\time.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "server - Win32 Debug" @@ -73,7 +73,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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\network_io\win32\Debug\network_io.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ..\network_io\win32\Debug\network_io.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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\time\win32\Debug\time.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF 1.2 +12 -0 apache-apr/apr/test/test.dsw Index: test.dsw =================================================================== RCS file: /home/cvs/apache-apr/apr/test/test.dsw,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- test.dsw 1999/06/15 17:43:23 1.1 +++ test.dsw 1999/06/17 18:56:10 1.2 @@ -69,6 +69,18 @@ ############################################################################### +Project: "timetest"=".\timetest.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Global: Package=<5> 1.4 +2 -2 apache-apr/apr/test/testfile.dsp Index: testfile.dsp =================================================================== RCS file: /home/cvs/apache-apr/apr/test/testfile.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- testfile.dsp 1999/06/15 17:43:23 1.3 +++ testfile.dsp 1999/06/17 18:56:10 1.4 @@ -50,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 ..\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 ..\network_io\win32\Debug /nologo /subsystem:console /debug /machine:I386 +# ADD LINK32 ..\network_io\win32\Debug 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 ..\time\win32\Debug\time.lib /nologo /subsystem:console /debug /machine:I386 !ELSEIF "$(CFG)" == "testfile - Win32 Debug" @@ -74,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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\network_io\win32\Debug\network_io.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ..\network_io\win32\Debug\network_io.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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\time\win32\Debug\time.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF 1.3 +2 -2 apache-apr/apr/test/testproc.dsp Index: testproc.dsp =================================================================== RCS file: /home/cvs/apache-apr/apr/test/testproc.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- testproc.dsp 1999/06/15 17:43:24 1.2 +++ testproc.dsp 1999/06/17 18:56:11 1.3 @@ -50,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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\file_io\win32\Debug\file_io.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 ..\network_io\win32\Debug /nologo /subsystem:console /machine:I386 +# ADD LINK32 ..\network_io\win32\Debug 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 ..\time\win32\Debug\time.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "testproc - Win32 Debug" @@ -74,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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\network_io\win32\Debug\network_io.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ..\network_io\win32\Debug\network_io.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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\time\win32\Debug\time.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF 1.2 +2 -2 apache-apr/apr/test/testsock.dsp Index: testsock.dsp =================================================================== RCS file: /home/cvs/apache-apr/apr/test/testsock.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- testsock.dsp 1999/06/15 17:43:27 1.1 +++ testsock.dsp 1999/06/17 18:56:11 1.2 @@ -50,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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\network_io\win32\Debug /nologo /subsystem:console /machine:I386 +# ADD LINK32 ..\network_io\win32\Debug 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 ..\time\win32\Debug\time.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "testsock - Win32 Debug" @@ -74,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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\network_io\win32\Debug\network_io.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ..\network_io\win32\Debug\network_io.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 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\time\win32\Debug\time.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF 1.4 +3 -2 apache-apr/apr/test/testtime.c Index: testtime.c =================================================================== RCS file: /home/cvs/apache-apr/apr/test/testtime.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- testtime.c 1999/05/25 17:03:54 1.3 +++ testtime.c 1999/06/17 18:56:12 1.4 @@ -157,7 +157,8 @@ fprintf(stdout, "OK\n"); fprintf(stdout, "\tImploding the time......."); - if (ap_implode_time(time2) != APR_SUCCESS) { + if (ap_implode_time(time2) != APR_SUCCESS || + ap_implode_time(time) != APR_SUCCESS) { fprintf(stderr, "Couldn't implode time\n"); exit(-1); } @@ -172,6 +173,6 @@ } fprintf(stdout, "OK\n"); - exit(1); + return 1; } 1.1 apache-apr/apr/test/timetest.dsp Index: timetest.dsp =================================================================== # Microsoft Developer Studio Project File - Name="timetest" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=timetest - 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 "timetest.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 "timetest.mak" CFG="timetest - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "timetest - Win32 Release" (based on\ "Win32 (x86) Console Application") !MESSAGE "timetest - 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)" == "timetest - 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 ..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib ..\time\win32\Debug\time.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "timetest - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "timetest" # PROP BASE Intermediate_Dir "timetest" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "timetest" # PROP Intermediate_Dir "timetest" # 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 ..\time\win32\Debug\time.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "timetest - Win32 Release" # Name "timetest - Win32 Debug" # Begin Source File SOURCE=.\testtime.c # End Source File # End Target # End Project 1.1 apache-apr/apr/time/win32/access.c Index: access.c =================================================================== /* ==================================================================== * Copyright (c) 1999 The Apache Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the Apache Group * for use in the Apache HTTP server project (http://www.apache.org/)." * * 4. The names "Apache Server" and "Apache Group" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the Apache Group * for use in the Apache HTTP server project (http://www.apache.org/)." * * THIS SOFTwARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY * EXPRESSED OR IMPLIED wARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED wARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOwEVER CAUSED AND ON ANY THEORY OF LIABILITY, wHETHER IN CONTRACT, * STRICT 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 SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Group. * For more information on the Apache Group and the Apache HTTP server * project, please see <http://www.apache.org/>. * */ #include "atime.h" #include "apr_time.h" #include "apr_general.h" #include "apr_lib.h" ap_status_t ap_get_curtime(struct atime_t *time, ap_int64_t *rv) { if (time) { (*rv) = time->currtime; return APR_SUCCESS; } return APR_ENOTIME; } ap_status_t ap_get_sec(struct atime_t *time, ap_int32_t *rv) { if (time) { (*rv) = time->explodedtime->wSecond; return APR_SUCCESS; } return APR_ENOTIME; } ap_status_t ap_get_min(struct atime_t *time, ap_int32_t *rv) { if (time) { (*rv) = time->explodedtime->wMinute; return APR_SUCCESS; } return APR_ENOTIME; } ap_status_t ap_get_hour(struct atime_t *time, ap_int32_t *rv) { if (time) { (*rv) = time->explodedtime->wHour; return APR_SUCCESS; } return APR_ENOTIME; } ap_status_t ap_get_mday(struct atime_t *time, ap_int32_t *rv) { if (time) { (*rv) = time->explodedtime->wDay; return APR_SUCCESS; } return APR_ENOTIME; } ap_status_t ap_get_mon(struct atime_t *time, ap_int32_t *rv) { if (time) { (*rv) = time->explodedtime->wMonth; return APR_SUCCESS; } return APR_ENOTIME; } ap_status_t ap_get_year(struct atime_t *time, ap_int32_t *rv) { if (time) { (*rv) = time->explodedtime->wYear; return APR_SUCCESS; } return APR_ENOTIME; } ap_status_t ap_get_wday(struct atime_t *time, ap_int32_t *rv) { if (time) { (*rv) = time->explodedtime->wDayOfWeek; return APR_SUCCESS; } return APR_ENOTIME; } ap_status_t ap_set_sec(struct atime_t *time, ap_int32_t value) { if (!time) { return APR_ENOTIME; } if (time->explodedtime == NULL) { time->explodedtime = (SYSTEMTIME *)ap_pcalloc(time->cntxt, sizeof(SYSTEMTIME)); } if (time->explodedtime == NULL) { return APR_ENOMEM; } time->explodedtime->wSecond = value; return APR_SUCCESS; } ap_status_t ap_set_min(struct atime_t *time, ap_int32_t value) { if (!time) { return APR_ENOTIME; } if (time->explodedtime == NULL) { time->explodedtime = (SYSTEMTIME *)ap_pcalloc(time->cntxt, sizeof(SYSTEMTIME)); } if (time->explodedtime == NULL) { return APR_ENOMEM; } time->explodedtime->wMinute = value; return APR_SUCCESS; } ap_status_t ap_set_hour(struct atime_t *time, ap_int32_t value) { if (!time) { return APR_ENOTIME; } if (time->explodedtime == NULL) { time->explodedtime = (SYSTEMTIME *)ap_pcalloc(time->cntxt, sizeof(SYSTEMTIME)); } if (time->explodedtime == NULL) { return APR_ENOMEM; } time->explodedtime->wHour = value; return APR_SUCCESS; } ap_status_t ap_set_mday(struct atime_t *time, ap_int32_t value) { if (!time) { return APR_ENOTIME; } if (time->explodedtime == NULL) { time->explodedtime = (SYSTEMTIME *)ap_pcalloc(time->cntxt, sizeof(SYSTEMTIME)); } if (time->explodedtime == NULL) { return APR_ENOMEM; } time->explodedtime->wDay = value; return APR_SUCCESS; } ap_status_t ap_set_mon(struct atime_t *time, ap_int32_t value) { if (!time) { return APR_ENOTIME; } if (time->explodedtime == NULL) { time->explodedtime = (SYSTEMTIME *)ap_pcalloc(time->cntxt, sizeof(SYSTEMTIME)); } if (time->explodedtime == NULL) { return APR_ENOMEM; } time->explodedtime->wMonth = value; return APR_SUCCESS; } ap_status_t ap_set_year(struct atime_t *time, ap_int32_t value) { if (!time) { return APR_ENOTIME; } if (time->explodedtime == NULL) { time->explodedtime = (SYSTEMTIME *)ap_pcalloc(time->cntxt, sizeof(SYSTEMTIME)); } if (time->explodedtime == NULL) { return APR_ENOMEM; } time->explodedtime->wYear = value; return APR_SUCCESS; } ap_status_t ap_set_wday(struct atime_t *time, ap_int32_t value) { if (!time) { return APR_ENOTIME; } if (time->explodedtime == NULL) { time->explodedtime = (SYSTEMTIME *)ap_pcalloc(time->cntxt, sizeof(SYSTEMTIME)); } if (time->explodedtime == NULL) { return APR_ENOMEM; } time->explodedtime->wDayOfWeek = value; return APR_SUCCESS; } 1.1 apache-apr/apr/time/win32/atime.h Index: atime.h =================================================================== /* ==================================================================== * Copyright (c) 1999 The Apache Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the Apache Group * for use in the Apache HTTP server project (http://www.apache.org/)." * * 4. The names "Apache Server" and "Apache Group" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the Apache Group * for use in the Apache HTTP server project (http://www.apache.org/)." * * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT 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 SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Group. * For more information on the Apache Group and the Apache HTTP server * project, please see <http://www.apache.org/>. * */ #ifndef ATIME_H #define ATIME_H #include "apr_time.h" #include <time.h> struct atime_t { ap_context_t *cntxt; time_t currtime; SYSTEMTIME *explodedtime; }; #endif /* ! ATIME_H */ 1.1 apache-apr/apr/time/win32/time.c Index: time.c =================================================================== /* ==================================================================== * Copyright (c) 1999 The Apache Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the Apache Group * for use in the Apache HTTP server project (http://www.apache.org/)." * * 4. The names "Apache Server" and "Apache Group" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the Apache Group * for use in the Apache HTTP server project (http://www.apache.org/)." * * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT 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 SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Group. * For more information on the Apache Group and the Apache HTTP server * project, please see <http://www.apache.org/>. * */ #include "atime.h" #include "apr_time.h" #include "apr_general.h" #include "apr_lib.h" #include <time.h> #include <errno.h> #include <string.h> ap_status_t ap_make_time(ap_context_t *cont, struct atime_t **new) { (*new) = (struct atime_t *)ap_palloc(cont, sizeof(struct atime_t)); if ((*new) == NULL) { return APR_ENOMEM; } (*new)->cntxt = cont; (*new)->currtime = -1; (*new)->explodedtime = NULL; return APR_SUCCESS; } ap_status_t ap_current_time(struct atime_t *new) { if (!new) { return APR_ENOTIME; } if (new->explodedtime == NULL) { new->explodedtime = (SYSTEMTIME *)ap_palloc(new->cntxt, sizeof(SYSTEMTIME)); } GetSystemTime(new->explodedtime); return APR_SUCCESS; } ap_status_t ap_explode_time(struct atime_t *atime, ap_timetype_e type) { if (!atime || !atime->explodedtime) { return APR_ENOTIME; } return APR_SUCCESS; } ap_status_t ap_implode_time(struct atime_t *atime) { FILETIME temp; if (!atime || !atime->explodedtime) { return APR_ENOTIME; } if (SystemTimeToFileTime(atime->explodedtime, &temp) == 0) { return APR_EEXIST; } atime->currtime = WinTimeToUnixTime(&temp); return APR_SUCCESS; } 1.1 apache-apr/apr/time/win32/time.def Index: time.def =================================================================== ; time.def : LIBRARY time DESCRIPTION '' EXPORTS ; Add new API calls to the end of this list. ap_make_time @1 ap_current_time @2 ap_explode_time @3 ap_implode_time @4 ap_get_curtime @5 ap_get_sec @6 ap_get_min @7 ap_get_hour @8 ap_get_mday @9 ap_get_mon @10 ap_get_year @11 ap_get_wday @12 ap_set_sec @13 ap_set_min @14 ap_set_hour @15 ap_set_mday @16 ap_set_mon @17 ap_set_year @18 ap_set_wday @19 1.1 apache-apr/apr/time/win32/time.dsp Index: time.dsp =================================================================== # Microsoft Developer Studio Project File - Name="time" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 5.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=time - 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 "time.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 "time.mak" CFG="time - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "time - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "time - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "time - 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 Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 # 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:windows /dll /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:windows /dll /machine:I386 !ELSEIF "$(CFG)" == "time - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\..\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 # 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:windows /dll /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 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "time - Win32 Release" # Name "time - Win32 Debug" # Begin Source File SOURCE=.\access.c # End Source File # Begin Source File SOURCE=.\atime.h # End Source File # Begin Source File SOURCE=.\time.c # End Source File # Begin Source File SOURCE=.\time.def # End Source File # End Target # End Project