sleep/alarm/pause

git-svn: trunk@2173
remotes/push_mirror/metadata
Nigel Horne 19 years ago
parent 122bc02e41
commit bd37d834cd
  1. 26
      clamav-devel/contrib/Windows/Projects/clamAV/libclamav/compat.c
  2. 4
      clamav-devel/contrib/Windows/Projects/clamAV/libclamav/compat.h

@ -229,19 +229,21 @@ gettimeofday(struct timeval *tp, void *tz)
return 0;
}
/* Windows has this in winsock.h, but including that breaks so many things */
unsigned long PASCAL FAR
ntohl(unsigned long x)
/* TODO */
int
geteuid(void)
{
return ((x & 0x000000ffU) << 24) |
((x & 0x0000ff00U) << 8) |
((x & 0x00ff0000U) >> 8) |
((x & 0xff000000U) >> 24);
return 0;
}
/* TODO */
int
geteuid(void)
getuid(void)
{
return 0;
}
int
getgid(void)
{
return 0;
}
@ -254,6 +256,7 @@ mmap(caddr_t address, size_t length, int protection, int flags, int fd, off_t of
LPVOID addr;
if(h) {
/* FIXME */
cli_errmsg("mmap: only one region may be mapped at a time\n");
return MAP_FAILED;
}
@ -310,3 +313,8 @@ munmap(caddr_t addr, size_t length)
return 0;
}
int chown(const char *filename, short uid, short gid)
{
return 0;
}

@ -104,6 +104,10 @@ void rewinddir(DIR *dir);
int closedir(DIR *dir);
int gettimeofday(struct timeval* tp, void* tz);
#define alarm(seconds)
#define sleep(seconds) Sleep(seconds * 1000)
#define pause();
#endif /* C_WINDOWS */
#endif /* CLAMAV_COMPAT_H */

Loading…
Cancel
Save