#98 Patch to improve C and C++ standard library support for Wind

5.0
closed-fixed
5
2009-09-02
2009-08-17
No

1. Undef the macro in the Windows CE CRT headers that transforms complex to _complex since this inteferes with use of std::complex.
2. Relocate the wide character support inlines from ctype.h to wctype.h to better reflect the standard location of these definitions.
3. Added a new _STLP_USE_WINCE_CRT_FUNCTIONS option that, when defined, adds simple versions of some of the CRT functions missing from the standard Windows CE CRT library (getenv, environ, time, clock, gmtime, localtime, remove, rename, wctomb, mbtowc, mblen, strerror, strxfrm, and wcsxfrm)

Discussion

  • David Deakins

    David Deakins - 2009-08-17
    • assigned_to: nobody --> complement
     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2009-08-18
    • status: open --> open-accepted
     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2009-08-18

    'complex' issue applied (2e58624 in STLport-5.2, d1d9d0f in master)

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2009-08-18

    'wide character support' issue, 3fc0744 in master, 0335026 in STLport-5.2

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2009-08-18

    '_STLP_USE_WINCE_CRT_FUNCTIONS' issue: commit 135bcee in STLport-5.2 branch. Review required---it was modified.

    IMO, no needs in declpec.h as separate file. User's settings come to wince/* files from _prolog.h in outer header.

     
  • David Deakins

    David Deakins - 2009-08-18

    The reason that I had to split the DLL import/export code out into a separate declspec.h file is that I had a circular dependency otherwise. In config\features.h, it includes config\_system.h. For Windows platforms, _system.h includes config/_windows.h and _windows.h includes the Win OS <windows.h> header. Unfortunately, <windows.h> wants to include <string.h> (at least for the Windows CE version) which, of course, includes wince/string.h. So then the problem is that wince/string.h gets included before feature.h has completed processing and before the _STLP_DECLSPEC macros have been defined in feature.h. The only way I could see to work around this was the extract the declspec code out into its own header that could be safely included in the wince headers if some part of feature.h pulled them in early.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2009-08-20

    config/feature.h do following:

    1. recognize system
    2. recognize compiler
    3. provide settings, based on info from (1) and (2)

    Right? You suggestion don't like to me because sequence (3')-(1)-(2)-(3'') looks ugly. Please, try to find another solution. If a trick will be complex, but impact _only_ Windows CE-related parts, it will be ok.

     
  • David Deakins

    David Deakins - 2009-08-28

    I just attached a new patch that resolves the circular dependency problem for string.h without requiring changes to other platforms. Basically, features.h will now delay the inclusion of the native windows.h header until the end of features.h for Windows CE. See if you think this is an acceptable implementation.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2009-09-02

    Done: [STLport-5.2 3f4c4a6, a548f04]; [master 63d908b, 2315456].

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2009-09-02
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.