summaryrefslogtreecommitdiff
path: root/compat/mingw.h
diff options
context:
space:
mode:
authorErik Faye-Lund <kusmabite@gmail.com>2012-12-04 09:10:38 +0100
committerJunio C Hamano <gitster@pobox.com>2012-12-04 08:00:58 -0800
commit176478a8bd028a3877d2be49a1e7a49386c095ce (patch)
tree06c6fee7c4374be2995276deed56cfd3d6eaaf67 /compat/mingw.h
parentf4f549892ac686a9adcf3cb72bee1a11c0566c88 (diff)
downloadgit-176478a8bd028a3877d2be49a1e7a49386c095ce.tar.gz
mingw: make fgetc raise SIGINT if apropriate
Set a control-handler to prevent the process from terminating, and simulate SIGINT so it can be handled by a signal-handler as usual. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/mingw.h')
-rw-r--r--compat/mingw.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index eeb08d120b..68db8b7f7d 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -179,6 +179,9 @@ int mingw_open (const char *filename, int oflags, ...);
ssize_t mingw_write(int fd, const void *buf, size_t count);
#define write mingw_write
+int mingw_fgetc(FILE *stream);
+#define fgetc mingw_fgetc
+
FILE *mingw_fopen (const char *filename, const char *otype);
#define fopen mingw_fopen
@@ -290,6 +293,9 @@ static inline unsigned int git_ntohl(unsigned int x)
sig_handler_t mingw_signal(int sig, sig_handler_t handler);
#define signal mingw_signal
+int mingw_raise(int sig);
+#define raise mingw_raise
+
/*
* ANSI emulation wrappers
*/