Re: [PATCH 05/11] winansi: fix compile warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sonntag, 31. Mai 2009, Johannes Sixt wrote:
> Steffen Prohaska schrieb:
> > 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;

Ok, forget this patch; I'll upgrade my MinGW instead, and let's assume all 
other mingw.git h4ckrz who aren't using the latest msysgit will upgrade as 
well.

Nevertheless, I think that the #include <conio.h> is in the wrong file: it 
should be included from compat/mingw.c.

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]