Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge branch 'msys2'
Browse files Browse the repository at this point in the history
Support compiling Git Cheetah in Git for Windows 2.x' SDK.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Aug 24, 2015
2 parents 122064e + 7efe830 commit 22fb06a
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
2 changes: 2 additions & 0 deletions common/Makefile
@@ -1,6 +1,8 @@
ifneq (,$(W64))
cross = /src/mingw-w64/sysroot/bin/x86_64-w64-mingw32-
CC = $(cross)gcc.exe
else
CC = gcc
endif

MODULES=debug.c exec.c menuengine.c cheetahmenu.c date.c \
Expand Down
2 changes: 2 additions & 0 deletions common/winexec.c
@@ -1,4 +1,6 @@
#ifdef _MSC_VER
#pragma once
#endif

#ifdef _WIN32

Expand Down
2 changes: 2 additions & 0 deletions compat/mingw.h
Expand Up @@ -13,12 +13,14 @@ typedef int pid_t;
#define S_IFLNK 0120000 /* Symbolic link */
#define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK)
#define S_ISSOCK(x) 0
#ifndef __MINGW64_VERSION_MAJOR
#define S_IRGRP 0
#define S_IWGRP 0
#define S_IXGRP 0
#define S_ISGID 0
#define S_IROTH 0
#define S_IXOTH 0
#endif

#define WIFEXITED(x) ((unsigned)(x) < 259) /* STILL_ACTIVE */
#define WEXITSTATUS(x) ((x) & 0xff)
Expand Down
2 changes: 1 addition & 1 deletion compat/winansi.c
Expand Up @@ -2,8 +2,8 @@
* Copyright 2008 Peter Harris <git@peter.is-a-geek.org>
*/

#include <windows.h>
#include "../common/git-compat-util.h"
#include <windows.h>

/*
Functions to be wrapped:
Expand Down
8 changes: 4 additions & 4 deletions explorer/ext.c
Expand Up @@ -19,12 +19,12 @@ DWORD lock_count = 0;
* Both of our COM objects contain pointers to the git_data object.
*/

inline ULONG STDMETHODCALLTYPE add_ref_git_data(struct git_data *this_)
ULONG STDMETHODCALLTYPE add_ref_git_data(struct git_data *this_)
{
return ++(this_->count);
}

inline ULONG STDMETHODCALLTYPE release_git_data(struct git_data *this_)
ULONG STDMETHODCALLTYPE release_git_data(struct git_data *this_)
{
if (--(this_->count) == 0) {
strbuf_release(&this_->other_files);
Expand All @@ -36,7 +36,7 @@ inline ULONG STDMETHODCALLTYPE release_git_data(struct git_data *this_)
return this_->count;
}

inline STDMETHODIMP query_interface_git_data(struct git_data *this_,
STDMETHODIMP query_interface_git_data(struct git_data *this_,
REFIID iid, LPVOID FAR *pointer)
{
if (IsEqualIID(iid, &IID_git_shell_ext) ||
Expand All @@ -56,7 +56,7 @@ inline STDMETHODIMP query_interface_git_data(struct git_data *this_,
return NOERROR;
}

inline STDMETHODIMP initialize_git_data(struct git_data *this_,
STDMETHODIMP initialize_git_data(struct git_data *this_,
LPCITEMIDLIST folder,
LPDATAOBJECT data, HKEY id)
{
Expand Down
8 changes: 4 additions & 4 deletions explorer/ext.h
Expand Up @@ -69,11 +69,11 @@ extern DWORD object_count;
extern DWORD lock_count;
extern HINSTANCE hInst;

inline STDMETHODIMP query_interface_git_data(struct git_data *this_,
STDMETHODIMP query_interface_git_data(struct git_data *this_,
REFIID iid, LPVOID FAR *pointer);
inline ULONG STDMETHODCALLTYPE add_ref_git_data(struct git_data *this_);
inline ULONG STDMETHODCALLTYPE release_git_data(struct git_data *this_);
inline STDMETHODIMP initialize_git_data(struct git_data *this_,
ULONG STDMETHODCALLTYPE add_ref_git_data(struct git_data *this_);
ULONG STDMETHODCALLTYPE release_git_data(struct git_data *this_);
STDMETHODIMP initialize_git_data(struct git_data *this_,
LPCITEMIDLIST folder,
LPDATAOBJECT data, HKEY id);

Expand Down
6 changes: 3 additions & 3 deletions explorer/menu.c
Expand Up @@ -135,7 +135,7 @@ BOOL menu_exists(HMENU menu)
* These are the functions for handling the context menu.
*/

inline STDMETHODIMP query_context_menu(void *p, HMENU menu,
STDMETHODIMP query_context_menu(void *p, HMENU menu,
UINT index, UINT first_command,
UINT last_command, UINT flags)
{
Expand Down Expand Up @@ -300,7 +300,7 @@ const char **menu_get_platform_argv(menu_commands cmd, void *data,
return argv;
}

inline STDMETHODIMP invoke_command(void *p,
STDMETHODIMP invoke_command(void *p,
LPCMINVOKECOMMANDINFO info)
{
struct git_menu *this_menu = p;
Expand All @@ -314,7 +314,7 @@ inline STDMETHODIMP invoke_command(void *p,
return S_OK;
}

inline STDMETHODIMP get_command_string(void *p, UINT id,
STDMETHODIMP get_command_string(void *p, UINT id,
UINT flags, UINT *reserved,
LPSTR name, UINT size)
{
Expand Down

0 comments on commit 22fb06a

Please sign in to comment.