Skip to content
Permalink
Browse files

Merge pull request #2149 from dscho/gcc-8-gfw

Make Git for Windows compile with GCC 8.x
  • Loading branch information...
dscho committed Apr 5, 2019
2 parents a7f813c + 77f8698 commit 61224e4fc644ed5196917d38e9f732c480b5d458
Showing with 9 additions and 3 deletions.
  1. +1 −1 compat/poll/poll.c
  2. +1 −1 compat/win32/exit-process.h
  3. +7 −1 kwset.c
@@ -149,7 +149,7 @@ win32_compute_revents (HANDLE h, int *p_sought)
case FILE_TYPE_PIPE:
if (!once_only)
{
NtQueryInformationFile = (PNtQueryInformationFile)
NtQueryInformationFile = (PNtQueryInformationFile)(void *)
GetProcAddress (GetModuleHandleA ("ntdll.dll"),
"NtQueryInformationFile");
once_only = TRUE;
@@ -130,7 +130,7 @@ static int exit_process(HANDLE process, int exit_code)
HINSTANCE kernel32 = GetModuleHandleA("kernel32");
if (!kernel32)
die("BUG: cannot find kernel32");
exit_process_address = (LPTHREAD_START_ROUTINE)
exit_process_address = (LPTHREAD_START_ROUTINE)(void *)
GetProcAddress(kernel32, "ExitProcess");
initialized = 1;
}
@@ -38,7 +38,13 @@
#include "compat/obstack.h"

#define NCHAR (UCHAR_MAX + 1)
#define obstack_chunk_alloc xmalloc
/* adapter for `xmalloc()`, which takes `size_t`, not `long` */
static void *obstack_chunk_alloc(long size)
{
if (size < 0)
BUG("Cannot allocate a negative amount: %ld", size);
return xmalloc(size);
}
#define obstack_chunk_free free

#define U(c) ((unsigned char) (c))

0 comments on commit 61224e4

Please sign in to comment.
You can’t perform that action at this time.