public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* Building setup.exe: conflicting declarations of ssize_t
@ 2011-09-04  2:19 Ken Brown
  2011-09-07  1:52 ` Christopher Faylor
  0 siblings, 1 reply; 4+ messages in thread
From: Ken Brown @ 2011-09-04  2:19 UTC (permalink / raw)
  To: cygwin-apps

Building setup.exe fails as follows:

depbase=`echo archive.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
        i686-pc-mingw32-g++ -DPACKAGE_NAME=\"setup\" -DPACKAGE_TARNAME=\"setup\" -DPACKAGE_VERSION=\"0\" -DPACKAGE_STRING=\"setup\ 0\" -DPACKAGE_BUGREPORT=\"xxx\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBMINGW32=1 -DHAVE_ERRNO_H=1 -DHAVE_STRING=1 -DHAVE_STRING_H=1 -I.  -DLZMA_API_STATIC -I./libgetopt++/include  -Werror -Wall -Wno-uninitialized -Wpointer-arith -Wcomments -Wcast-align -Wwrite-strings -g -O2 -MT archive.o -MD -MP -MF $depbase.Tpo -c -o archive.o archive.cc &&\
        mv -f $depbase.Tpo $depbase.Po
In file included from archive.cc:26:0:
io_stream.h:37:21: error: conflicting declaration ‘typedef long int ssize_t’
/usr/i686-pc-mingw32/sys-root/mingw/include/sys/types.h:118:18: error: ‘ssize_t’ has a previous declaration as ‘typedef _ssize_t ssize_t’

The conflicting declarations result from the following recent change to the mingw-runtime package:

2011-08-19  Chris Sutcliffe  <xxx>

	* include/sys/types.h (ssize_t): Defined as int as opposed to long.

The following patch enables the build to complete, but I don't know if it's the right way to fix this:

--- io_stream.h.orig    2009-12-18 06:59:54.000000000 -0500
+++ io_stream.h 2011-09-03 21:14:44.664235000 -0400
@@ -33,7 +33,7 @@
  */

 //Where is this defined?
-#if defined(_WIN32) && ! defined(__CYGWIN__)
+#if defined(_WIN32) && ! defined(__CYGWIN__) && ! defined(HAVE_SYS_TYPES_H)
 typedef signed long ssize_t;
 #endif

Ken


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Building setup.exe: conflicting declarations of ssize_t
  2011-09-04  2:19 Building setup.exe: conflicting declarations of ssize_t Ken Brown
@ 2011-09-07  1:52 ` Christopher Faylor
  2011-09-07 12:19   ` Ken Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Faylor @ 2011-09-07  1:52 UTC (permalink / raw)
  To: cygwin-apps

On Sat, Sep 03, 2011 at 10:19:57PM -0400, Ken Brown wrote:
>Building setup.exe fails as follows:
>
>depbase=`echo archive.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
>        i686-pc-mingw32-g++ -DPACKAGE_NAME=\"setup\" -DPACKAGE_TARNAME=\"setup\" -DPACKAGE_VERSION=\"0\" -DPACKAGE_STRING=\"setup\ 0\" -DPACKAGE_BUGREPORT=\"xxx\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBMINGW32=1 -DHAVE_ERRNO_H=1 -DHAVE_STRING=1 -DHAVE_STRING_H=1 -I.  -DLZMA_API_STATIC -I./libgetopt++/include  -Werror -Wall -Wno-uninitialized -Wpointer-arith -Wcomments -Wcast-align -Wwrite-strings -g -O2 -MT archive.o -MD -MP -MF $depbase.Tpo -c -o archive.o archive.cc &&\
>        mv -f $depbase.Tpo $depbase.Po
>In file included from archive.cc:26:0:
>io_stream.h:37:21: error: conflicting declaration ??typedef long int ssize_t??
>/usr/i686-pc-mingw32/sys-root/mingw/include/sys/types.h:118:18: error: ??ssize_t?? has a previous declaration as ??typedef _ssize_t ssize_t??
>
>The conflicting declarations result from the following recent change to the mingw-runtime package:
>
>2011-08-19  Chris Sutcliffe  <xxx>
>
>	* include/sys/types.h (ssize_t): Defined as int as opposed to long.
>
>The following patch enables the build to complete, but I don't know if it's the right way to fix this:
>
>--- io_stream.h.orig    2009-12-18 06:59:54.000000000 -0500
>+++ io_stream.h 2011-09-03 21:14:44.664235000 -0400
>@@ -33,7 +33,7 @@
>  */
>
> //Where is this defined?
>-#if defined(_WIN32) && ! defined(__CYGWIN__)
>+#if defined(_WIN32) && ! defined(__CYGWIN__) && ! defined(HAVE_SYS_TYPES_H)
> typedef signed long ssize_t;
> #endif

That's definitely the wrong approach to fix the problem.

Why not just include sys/types.h in io_stream.h?

cgf

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Building setup.exe: conflicting declarations of ssize_t
  2011-09-07  1:52 ` Christopher Faylor
@ 2011-09-07 12:19   ` Ken Brown
  2011-09-09 13:21     ` Christopher Faylor
  0 siblings, 1 reply; 4+ messages in thread
From: Ken Brown @ 2011-09-07 12:19 UTC (permalink / raw)
  To: cygwin-apps

On 9/6/2011 9:52 PM, Christopher Faylor wrote:
> On Sat, Sep 03, 2011 at 10:19:57PM -0400, Ken Brown wrote:
>> Building setup.exe fails as follows:
>>
>> depbase=`echo archive.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
>>         i686-pc-mingw32-g++ -DPACKAGE_NAME=\"setup\" -DPACKAGE_TARNAME=\"setup\" -DPACKAGE_VERSION=\"0\" -DPACKAGE_STRING=\"setup\ 0\" -DPACKAGE_BUGREPORT=\"xxx\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBMINGW32=1 -DHAVE_ERRNO_H=1 -DHAVE_STRING=1 -DHAVE_STRING_H=1 -I.  -DLZMA_API_STATIC -I./libgetopt++/include  -Werror -Wall -Wno-uninitialized -Wpointer-arith -Wcomments -Wcast-align -Wwrite-strings -g -O2 -MT archive.o -MD -MP -MF $depbase.Tpo -c -o archive.o archive.cc&&\
>>         mv -f $depbase.Tpo $depbase.Po
>> In file included from archive.cc:26:0:
>> io_stream.h:37:21: error: conflicting declaration ??typedef long int ssize_t??
>> /usr/i686-pc-mingw32/sys-root/mingw/include/sys/types.h:118:18: error: ??ssize_t?? has a previous declaration as ??typedef _ssize_t ssize_t??
>>
>> The conflicting declarations result from the following recent change to the mingw-runtime package:
>>
>> 2011-08-19  Chris Sutcliffe<xxx>
>>
>> 	* include/sys/types.h (ssize_t): Defined as int as opposed to long.
>>
>> The following patch enables the build to complete, but I don't know if it's the right way to fix this:
>>
>> --- io_stream.h.orig    2009-12-18 06:59:54.000000000 -0500
>> +++ io_stream.h 2011-09-03 21:14:44.664235000 -0400
>> @@ -33,7 +33,7 @@
>>   */
>>
>> //Where is this defined?
>> -#if defined(_WIN32)&&  ! defined(__CYGWIN__)
>> +#if defined(_WIN32)&&  ! defined(__CYGWIN__)&&  ! defined(HAVE_SYS_TYPES_H)
>> typedef signed long ssize_t;
>> #endif
>
> That's definitely the wrong approach to fix the problem.
>
> Why not just include sys/types.h in io_stream.h?

You mean just do this?

--- io_stream.h.orig    2009-12-18 06:59:54.000000000 -0500
+++ io_stream.h 2011-09-07 07:49:04.458548000 -0400
@@ -32,10 +32,7 @@
   * make mkdir_p fit in the hierarchy
   */

-//Where is this defined?
-#if defined(_WIN32) && ! defined(__CYGWIN__)
-typedef signed long ssize_t;
-#endif
+#include <sys/types.h>

  #if __GNUC__
  #define _ATTR_(foo) __attribute__ foo

Ken

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Building setup.exe: conflicting declarations of ssize_t
  2011-09-07 12:19   ` Ken Brown
@ 2011-09-09 13:21     ` Christopher Faylor
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Faylor @ 2011-09-09 13:21 UTC (permalink / raw)
  To: cygwin-apps

On Wed, Sep 07, 2011 at 08:18:30AM -0400, Ken Brown wrote:
>On 9/6/2011 9:52 PM, Christopher Faylor wrote:
>> On Sat, Sep 03, 2011 at 10:19:57PM -0400, Ken Brown wrote:
>>> Building setup.exe fails as follows:
>>>
>>> depbase=`echo archive.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
>>>         i686-pc-mingw32-g++ -DPACKAGE_NAME=\"setup\" -DPACKAGE_TARNAME=\"setup\" -DPACKAGE_VERSION=\"0\" -DPACKAGE_STRING=\"setup\ 0\" -DPACKAGE_BUGREPORT=\"xxx\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBMINGW32=1 -DHAVE_ERRNO_H=1 -DHAVE_STRING=1 -DHAVE_STRING_H=1 -I.  -DLZMA_API_STATIC -I./libgetopt++/include  -Werror -Wall -Wno-uninitialized -Wpointer-arith -Wcomments -Wcast-align -Wwrite-strings -g -O2 -MT archive.o -MD -MP -MF $depbase.Tpo -c -o archive.o archive.cc&&\
>>>         mv -f $depbase.Tpo $depbase.Po
>>> In file included from archive.cc:26:0:
>>> io_stream.h:37:21: error: conflicting declaration ??typedef long int ssize_t??
>>> /usr/i686-pc-mingw32/sys-root/mingw/include/sys/types.h:118:18: error: ??ssize_t?? has a previous declaration as ??typedef _ssize_t ssize_t??
>>>
>>> The conflicting declarations result from the following recent change to the mingw-runtime package:
>>>
>>> 2011-08-19  Chris Sutcliffe<xxx>
>>>
>>> 	* include/sys/types.h (ssize_t): Defined as int as opposed to long.
>>>
>>> The following patch enables the build to complete, but I don't know if it's the right way to fix this:
>>>
>>> --- io_stream.h.orig    2009-12-18 06:59:54.000000000 -0500
>>> +++ io_stream.h 2011-09-03 21:14:44.664235000 -0400
>>> @@ -33,7 +33,7 @@
>>>   */
>>>
>>> //Where is this defined?
>>> -#if defined(_WIN32)&&  ! defined(__CYGWIN__)
>>> +#if defined(_WIN32)&&  ! defined(__CYGWIN__)&&  ! defined(HAVE_SYS_TYPES_H)
>>> typedef signed long ssize_t;
>>> #endif
>>
>> That's definitely the wrong approach to fix the problem.
>>
>> Why not just include sys/types.h in io_stream.h?
>
>You mean just do this?
>
>--- io_stream.h.orig    2009-12-18 06:59:54.000000000 -0500
>+++ io_stream.h 2011-09-07 07:49:04.458548000 -0400
>@@ -32,10 +32,7 @@
>   * make mkdir_p fit in the hierarchy
>   */
>
>-//Where is this defined?
>-#if defined(_WIN32) && ! defined(__CYGWIN__)
>-typedef signed long ssize_t;
>-#endif
>+#include <sys/types.h>
>
>  #if __GNUC__
>  #define _ATTR_(foo) __attribute__ foo

Yes.  I was testing that change after I saw your original mail.  It was
checked in yesterday.

FYI.

cgf

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-09 13:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-04  2:19 Building setup.exe: conflicting declarations of ssize_t Ken Brown
2011-09-07  1:52 ` Christopher Faylor
2011-09-07 12:19   ` Ken Brown
2011-09-09 13:21     ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).