#define WINVER 0x0500
#include "archive_platform.h"
+#include <ctype.h>
#include <errno.h>
#include <stddef.h>
#include <sys/utime.h>
wsp += 4;
slen -= 4;
}
- wcsncpy_s(wsp, slen, wnp, _TRUNCATE);
+ wcsncpy(wsp, wnp, slen);
+ wsp[slen - 1] = L'\0'; /* Ensure null termination. */
free(wn);
return (ws);
}
ssize_t
la_write(int fd, const void *buf, size_t nbytes)
{
- uint32_t bytes_written;
+ DWORD bytes_written;
#ifdef _WIN64
if (nbytes > UINT32_MAX)
if (!ctx->valid)
return;
- CryptHashData(ctx->hash, buf, (DWORD)len, 0);
+ CryptHashData(ctx->hash,
+ (unsigned char *)(uintptr_t)buf,
+ (DWORD)len, 0);
}
static void