Menu

#62 Missing include for wchar_t

closed-fixed
None
5
2010-01-20
2010-01-17
No

Hello,

A Debian user reported
http://bugs.debian.org/565571
that although it uses wchar_t, speak_lib.h doesn't include stddef.h to
get the wchar_t type. It should probably, to save the programmer the
burden to find out what she should include.

Samuel

Discussion

  • Samuel Thibault

    Samuel Thibault - 2010-01-17
     
  • Jonathan Duddington

    speak_lib.h includes stdio.h, which includes stddef.h.

     
  • Jonathan Duddington

    • assigned_to: nobody --> jonsd
    • status: open --> open-works-for-me
     
  • Samuel Thibault

    Samuel Thibault - 2010-01-17

    But as specified in POSIX, that doesn't necessarily bring the wchar_t definition. stdio.h #defines __need_size_t and __need_NULL to tell stddef.h that it only wants to pull size_t and NULL definitions. All other types won't be defined by stddef.h during that inclusing. It needs to be explicitely included by the application without any __need_foo macro defined in order to get all definitions.

    Did you try compiling #include <espeak/speak_lib.h> alone?

     
  • Jonathan Duddington

    OK, I've added

    #include <stddef.h>

    in speak_lib.h, in eSpeak version 1.42.33, at:
    http;//espeak.sf.net/test/latest.html

     
  • Jonathan Duddington

    • status: open-works-for-me --> closed-fixed
     

Log in to post a comment.