Hmm, confusing stuff. On http://msdn.microsoft.com/en-us/library/ms860492.aspx you'll find that _fileno returns an int value. I believe that _fileno and fileno are the same, but I may be mistaken.
MSDN also mentions that _fileno is ISO C++ conformant, and fileno is deprecated. Our src/mingw/include/stdio.h says : #ifndef __COREDLL__ _CRTIMP int __cdecl __MINGW_NOTHROW fgetchar (void); _CRTIMP int __cdecl __MINGW_NOTHROW fputchar (int); _CRTIMP int __cdecl __MINGW_NOTHROW fileno (FILE*); #else /* We know the Microsoft defines _fileno as returning a void* (HANDLE), but that is so anoying, that we define it as returning int, which is ok on arm (32-bit). _CRTIMP void* __cdecl __MINGW_NOTHROW fileno (FILE*); */ _CRTIMP int __cdecl __MINGW_NOTHROW fileno (FILE*); #endif Not sure what to do with this. Opinions anyone ? Danny On Mon, 2009-05-18 at 10:09 +0200, Johnny Willemsen wrote: > Hi, > > The program below does compile file with msvc, but not with cegcc. We then > get the error: > > exitpr.cpp: In function 'int main(int, char**)': > exitpr.cpp:6: error: invalid conversion from 'int' to 'void*' > > Johnny > > #include <windows.h> > > int main (int argc, char*[]) > { > FILE* a; > void * b = fileno(a); > } > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Cegcc-devel mailing list > Cegcc-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/cegcc-devel > -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel