-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 17.08.2012 09:37, schrieb Rainer Emrich:
> After the gcc cxx-conversion merge has taken place, I get a conflicting 
> declaration of getcwd in io.h in several places while bootstrapping
> gcc-4.8.0.
> 
> In file included from ../../../src/gcc-4.8.0/gcc/ggc-common.c:25:0: 
> ../../../src/gcc-4.8.0/gcc/system.h:423:36: error: declaration of C
> function 'char* getcwd(char*, size_t)' conflicts with In file included from
> D:/x86_64-w64-trunk/mingw/include/unistd.h:10:0, from
> ../../../src/gcc-4.8.0/gcc/system.h:253, from
> ../../../src/gcc-4.8.0/gcc/ggc-common.c:25: 
> D:/x86_64-w64-trunk/mingw/include/io.h:266:17: error: previous declaration 
> 'char* getcwd(char*, int)' here
> 

Oops, there's a second declaration in direct.h, has to be changed accordingly.
OTOH, why do we have declarations at 2 locations in the first place?

revised patch attached.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJQLg/lAAoJEB3HOsWs+KJbPesH/04ierFS944cTvh6w3TG9j0K
bMNam46Ge7NslxQiI53ORSjnaEtnDdZ/fdR4EiixWm9Jbf82ij8GsFdQoZHMTq1y
mqUOsLJfGUOSUymiX0yWf0eFzyILoXx2wy+SfbJGHXv8DiTjruQDFlTNIsNkkdmu
q9OarBDojVh7ttmDmVFgcBfaa9OP0IXdzVsZASLdPCsbBaS9NQRkzGzLoA7bzryf
cBWu/Yagl1Wt96c1RXWIW0bljDkZVOyUt7fWNIi/950G7G3SuBZpQ9Yj+hbxJqtR
vsNPgXwgkvC96mJgg7+W4//87jKgNDzImw6P++rkZQP5ARfHqfgHzhMrnTdUA4Y=
=mNEi
-----END PGP SIGNATURE-----
Index: mingw-w64-headers/crt/io.h
===================================================================
--- mingw-w64-headers/crt/io.h  (Revision 5371)
+++ mingw-w64-headers/crt/io.h  (Arbeitskopie)
@@ -263,7 +263,7 @@ _CRTIMP char* __cdecl _getcwd (char*, in
 #ifndef NO_OLDNAMES
 #ifndef _UWIN
   int __cdecl chdir (const char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
-  char *__cdecl getcwd (char *, int) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
+  char *__cdecl getcwd (char *, size_t) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
   int __cdecl mkdir (const char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
   char *__cdecl mktemp(char *) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
   int __cdecl rmdir (const char*) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
Index: mingw-w64-headers/crt/direct.h
===================================================================
--- mingw-w64-headers/crt/direct.h      (Revision 5371)
+++ mingw-w64-headers/crt/direct.h      (Arbeitskopie)
@@ -54,7 +54,7 @@ extern "C" {
 
 #define diskfree_t _diskfree_t
 
-  char *__cdecl getcwd(char *_DstBuf,int _SizeInBytes) 
__MINGW_ATTRIB_DEPRECATED_MSVC2005;
+  char *__cdecl getcwd(char *_DstBuf,size_t _SizeInBytes) 
__MINGW_ATTRIB_DEPRECATED_MSVC2005;
   int __cdecl chdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
   int __cdecl mkdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
   int __cdecl rmdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
------------------------------------------------------------------------------
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

Reply via email to