On 08/17/12 11:42, Rainer Emrich wrote: > Am 17.08.2012 11:29, schrieb Kai Tietz: > > Hallo Rainer, > > > well, the issue is that msvcrt's getcwd has as second argument the > > pointer-length-argument typed as 'int'. You can check this also by > > seaching on msdn for getcwd. For 32-bit it is just a sign-difference of > > this argument, which is pretty unlikely to reach (0x7fffffffu + > 1u). For > > 64-bit is sizeof(size_t) > sizeof(int), which means that we get a > > value-truncation and a sign-difference. Not that it is likely that > > somebody calls getcwd with pointer-length-argument bigger then 2^31 > value. > > > So I would like to get first the opinion of Jacek, and Ozkan about > this. It > > might be more an issue of the prototype in gcc IMHO. > > The prototype conforms to the Linux man pages and POSIX.2001
Although POSIX version seems better, we have to deal with the fact that it's int on Windows. Why does GCC declare it in its headers in the first place? It seems like it should use host headers for getcwd declaration. This way there would be no conflict. Jacek ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
