/usr/src/redhat/BUILD/httpd-2.2.3/srclib/apr/include/arch/win32/apr_arch_atime.h

00001 /* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
00002  * applicable.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef ATIME_H
00018 #define ATIME_H
00019 
00020 #include "apr_private.h"
00021 #include "apr_time.h"
00022 #if APR_HAVE_TIME_H
00023 #include <time.h>
00024 #endif
00025 
00026 struct atime_t {
00027     apr_pool_t *cntxt;
00028     apr_time_t currtime;
00029     SYSTEMTIME *explodedtime;
00030 };
00031 
00032 
00033 /* Number of micro-seconds between the beginning of the Windows epoch
00034  * (Jan. 1, 1601) and the Unix epoch (Jan. 1, 1970) 
00035  */
00036 #define APR_DELTA_EPOCH_IN_USEC   APR_TIME_C(11644473600000000);
00037 
00038 
00039 __inline void FileTimeToAprTime(apr_time_t *result, FILETIME *input)
00040 {
00041     /* Convert FILETIME one 64 bit number so we can work with it. */
00042     *result = input->dwHighDateTime;
00043     *result = (*result) << 32;
00044     *result |= input->dwLowDateTime;
00045     *result /= 10;    /* Convert from 100 nano-sec periods to micro-seconds. */
00046     *result -= APR_DELTA_EPOCH_IN_USEC;  /* Convert from Windows epoch to Unix epoch */
00047     return;
00048 }
00049 
00050 
00051 __inline void AprTimeToFileTime(LPFILETIME pft, apr_time_t t)
00052 {
00053     LONGLONG ll;
00054     t += APR_DELTA_EPOCH_IN_USEC;
00055     ll = t * 10;
00056     pft->dwLowDateTime = (DWORD)ll;
00057     pft->dwHighDateTime = (DWORD) (ll >> 32);
00058     return;
00059 }
00060 
00061 
00062 #endif  /* ! ATIME_H */
00063 

Apacheに対してSun Jul 19 22:05:24 2009に生成されました。  doxygen 1.4.7