Re: [PATCH 05/11] winansi: fix compile warnings
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- May 31, 2009, 18:03 UTC
- Message-ID
- <4A22C674.603@kdbg.org>
- In-Reply-To
- <1243786525-4493-6-git-send-email-prohaska@zib.de>
Steffen Prohaska schrieb:
Show 11 quoted lines
> diff --git a/compat/win32.h b/compat/win32.h
> index c26384e..d531130 100644
> --- a/compat/win32.h
> +++ b/compat/win32.h
> @@ -1,5 +1,6 @@
> /* common Win32 functions for MinGW and Cygwin */
> #include <windows.h>
> +#include <conio.h>
>
> static inline int file_attr_to_st_mode (DWORD attr)
> {I assume this is to remove the warning about missing declaration of _getch(). Can we have this patch instead? I don't have conio.h in my oldish MinGW environment.
diff --git a/compat/mingw.c b/compat/mingw.c index 52961ee..53053ad 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1211,6 +1211,9 @@ int link(const char *oldpath, const char *newpath) return 0; } +/* from conio.h */ +int _getch(void); // FIXME: really look this up in conio.h!!!! + char *getpass(const char *prompt) { struct strbuf buf = STRBUF_INIT; > diff --git a/compat/winansi.c b/compat/winansi.c > index 4bee335..9217c24 100644 > --- a/compat/winansi.c > +++ b/compat/winansi.c > @@ -80,7 +80,7 @@ static void set_console_attr(void) > static void erase_in_line(void) > { > CONSOLE_SCREEN_BUFFER_INFO sbi; > - long dummy; /* Needed for Windows 7 (or Vista) regression */ > + DWORD dummy; /* Needed for Windows 7 (or Vista) regression */ > > if (!console) > return; This should really be squashed into 03/11, where the line is introduced. -- Hannes