NO

Author Topic: [Solved]Redeclaration of 'ssize_t'  (Read 3496 times)

BlueD

  • Guest
[Solved]Redeclaration of 'ssize_t'
« 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.

Code: [Select]
#define __STDC_WANT_LIB_EXT2__ 1

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

int main(void)
{
  return 0;
}

Error message:
Quote
C:\Program Files\PellesC\Include\wchar.h(283): error #2119: Redeclaration of 'ssize_t', previously declared at C:\Program Files\PellesC\Include\stdio.h(344).
« Last Edit: November 02, 2010, 05:29:24 AM by BlueD »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Redeclaration of 'ssize_t'
« Reply #1 on: October 31, 2010, 07:37:06 AM »
In Pelles C 6.50 RC2(32 bit):
I cannot define __STDC_WANT_LIB_EXT2__ and use "wchar.h" at the same time.

Code: [Select]
#define __STDC_WANT_LIB_EXT2__ 1

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

int main(void)
{
  return 0;
}

Error message:
Quote
C:\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.
May the source be with you

BlueD

  • Guest
Re: Redeclaration of 'ssize_t'
« Reply #2 on: October 31, 2010, 08:13:31 AM »
Thanks, that solved my problem.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: [Solved]Redeclaration of 'ssize_t'
« Reply #3 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...
/Pelle