Pelles C forum

Pelles C => Bug reports => Topic started by: BlueD on October 31, 2010, 02:53:50 AM

Title: [Solved]Redeclaration of 'ssize_t'
Post by: BlueD on October 31, 2010, 02:53:50 AM
In Pelles C 6.50 RC2(32 bit):
I cannot define __STDC_WANT_LIB_EXT2__ and use "wchar.h" at the same time.


#define __STDC_WANT_LIB_EXT2__ 1

#include <stdio.h>
#include <wchar.h>

int main(void)
{
 return 0;
}


Error message:
QuoteC:\Program Files\PellesC\Include\wchar.h(283): error #2119: Redeclaration of 'ssize_t', previously declared at C:\Program Files\PellesC\Include\stdio.h(344).
Title: Re: Redeclaration of 'ssize_t'
Post by: TimoVJL on October 31, 2010, 07:37:06 AM
Quote from: BlueD on October 31, 2010, 02:53:50 AM
In Pelles C 6.50 RC2(32 bit):
I cannot define __STDC_WANT_LIB_EXT2__ and use "wchar.h" at the same time.


#define __STDC_WANT_LIB_EXT2__ 1

#include <stdio.h>
#include <wchar.h>

int main(void)
{
 return 0;
}


Error message:
QuoteC:\Program Files\PellesC\Include\wchar.h(283): error #2119: Redeclaration of 'ssize_t', previously declared at C:\Program Files\PellesC\Include\stdio.h(344).

With compiler option Define compatibility names that can be compiled.
Title: Re: Redeclaration of 'ssize_t'
Post by: BlueD on October 31, 2010, 08:13:31 AM
Thanks, that solved my problem.
Title: Re: [Solved]Redeclaration of 'ssize_t'
Post by: Pelle on November 04, 2010, 05:52:57 PM
The latests draft I have for TR24731-2 (n1337.pdf) just introduces the type ssize_t without further explanation, and since this type is not part of standard C99 I don't know how to handle this right now. Perhaps the next draft will be better...