summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorstoddard <stoddard@13f79535-47bb-0310-9956-ffa450edef68>2000-03-28 21:22:22 +0000
committerstoddard <stoddard@13f79535-47bb-0310-9956-ffa450edef68>2000-03-28 21:22:22 +0000
commit47b4544a34105a2436aaebd516953954d2a8eb1a (patch)
tree8428b8048ecb2dc4a6c3cc4d1a32ca1367aaa7a1 /misc
parent0bc674a1e0f9b0b82bb16fba9e3a03b21d9b4d08 (diff)
downloadlibapr-47b4544a34105a2436aaebd516953954d2a8eb1a.tar.gz
Get rid of WinTimeToUnixTime. Replace all instances of its use with
FileTimeToAprTime. Move timetest.c into the attic. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59744 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc')
-rw-r--r--misc/win32/timetest.c75
1 files changed, 0 insertions, 75 deletions
diff --git a/misc/win32/timetest.c b/misc/win32/timetest.c
deleted file mode 100644
index 7efd06d81..000000000
--- a/misc/win32/timetest.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* ====================================================================
- * Copyright (c) 2000 The Apache Software Foundation. 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 Software Foundation
- * for use in the Apache HTTP server project (http://www.apache.org/)."
- *
- * 4. The names "Apache Server" and "Apache Software Foundation" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * apache@apache.org.
- *
- * 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 Software Foundation.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- * "This product includes software developed by the Apache Software Foundation
- * for use in the Apache HTTP server project (http://www.apache.org/)."
- *
- * THIS SOFTWARE IS PROVIDED BY THE Apache Software Foundation ``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 Software Foundation 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 Software Foundation.
- * For more information on the Apache Software Foundation and the Apache HTTP server
- * project, please see <http://www.apache.org/>.
- *
- */
-#include <windows.h>
-#include <time.h>
-#include <stdio.h>
-
-time_t WinTimeToUnixTime(FILETIME *time)
-{
- LONGLONG temp = 0;
- /* Convert to one 64 bit number so we can work with it. */
- temp = time->dwHighDateTime;
- temp = temp << 32;
- temp |= time->dwLowDateTime;
-
- /* Convert from Windows epoch (Jan 1, 1600) to Unix
- * epoch (Jan 1, 1970)
- */
- temp -= 116444736000000000;
- /* Convert from 100 nano-sec blocks to seconds. */
- temp /= 10000000;
-
- return (time_t) temp;
-}