diff --git a/compat/mingw.c b/compat/mingw.c
index 5478b747ceebfd44e9e5b45cda5267244acb8ff6..15fe33eaa0f220e94131006bca89effd14d6d058 100644 (file)
--- a/compat/mingw.c
+++ b/compat/mingw.c
#include <conio.h>
#include "../strbuf.h"
#include <conio.h>
#include "../strbuf.h"
-unsigned int _CRT_fmode = _O_BINARY;
+#include <shellapi.h>
static int err_win_to_posix(DWORD winerr)
{
static int err_win_to_posix(DWORD winerr)
{
return -1;
}
return -1;
}
+/*
+ * Note that this doesn't return the actual pagesize, but
+ * the allocation granularity. If future Windows specific git code
+ * needs the real getpagesize function, we need to find another solution.
+ */
+int mingw_getpagesize(void)
+{
+ SYSTEM_INFO si;
+ GetSystemInfo(&si);
+ return si.dwAllocationGranularity;
+}
+
struct passwd *getpwuid(int uid)
{
static char user_name[100];
struct passwd *getpwuid(int uid)
{
static char user_name[100];
* length to call the signal handler.
*/
* length to call the signal handler.
*/
-static __stdcall unsigned ticktack(void *dummy)
+static unsigned __stdcall ticktack(void *dummy)
{
while (WaitForSingleObject(timer_event, timer_interval) == WAIT_TIMEOUT) {
if (timer_fn == SIG_DFL)
{
while (WaitForSingleObject(timer_event, timer_interval) == WAIT_TIMEOUT) {
if (timer_fn == SIG_DFL)
int link(const char *oldpath, const char *newpath)
{
int link(const char *oldpath, const char *newpath)
{
- typedef BOOL WINAPI (*T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
+ typedef BOOL (WINAPI *T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
static T create_hard_link = NULL;
if (!create_hard_link) {
create_hard_link = (T) GetProcAddress(
static T create_hard_link = NULL;
if (!create_hard_link) {
create_hard_link = (T) GetProcAddress(