win32: add gettimeofday

0.96
aCaB 16 years ago
parent b8f3f028b2
commit 2d777de59d
  1. 4
      ChangeLog
  2. 36
      win32/compat/gettimeofday.c
  3. 26
      win32/compat/gettimeofday.h
  4. 24
      win32/libclamav.vcproj

@ -1,3 +1,7 @@
Mon Oct 12 23:39:30 CEST 2009 (acab)
------------------------------------
* win32: libclamav compiles
Mon Oct 12 23:33:32 CEST 2009 (acab)
------------------------------------
* /win32: VC project file and 3rd party stuff

@ -0,0 +1,36 @@
/*
* Copyright (C) 2009 Sourcefire, Inc.
*
* Authors: aCaB <acab@clamav.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#if HAVE_CONFIG_H
#include "clamav-config.h"
#endif
#include <sys/types.h>
#include <sys/timeb.h>
#include "gettimeofday.h"
int gettimeofday(struct timeval *tv, struct timezone *tz) {
struct _timeb t;
_ftime_s(&t);
tv->tv_sec = t.time;
tv->tv_usec = t.millitm * 1000;
return 0;
}

@ -0,0 +1,26 @@
/*
* Copyright (C) 2009 Sourcefire, Inc.
*
* Authors: aCaB <acab@clamav.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#ifndef __GETLOCALTIME_H
#define __GETLOCALTIME_H
int gettimeofday(struct timeval *tv, struct timezone *tz);
#endif /* __GETLOCALTIME_H */

@ -241,10 +241,6 @@
RelativePath="..\libclamav\dconf.c"
>
</File>
<File
RelativePath=".\compat\dirent.c"
>
</File>
<File
RelativePath="..\libclamav\disasm.c"
>
@ -305,10 +301,6 @@
RelativePath="..\libclamav\line.c"
>
</File>
<File
RelativePath=".\compat\ltdl.c"
>
</File>
<File
RelativePath="..\libclamav\lzma_iface.c"
>
@ -769,6 +761,22 @@
>
</File>
</Filter>
<Filter
Name="compat"
>
<File
RelativePath=".\compat\dirent.c"
>
</File>
<File
RelativePath=".\compat\gettimeofday.c"
>
</File>
<File
RelativePath=".\compat\ltdl.c"
>
</File>
</Filter>
</Filter>
<Filter
Name="Header Files"

Loading…
Cancel
Save