[Git][wxwidgets/wxwidgets][master] 2 commits: Fix compilation problem due to memset_s() when using PCH

0 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Oct 31, 2025, 10:33:46 AMOct 31
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • e913e9eb
    by Vadim Zeitlin at 2025-10-30T20:36:03+01:00
    Fix compilation problem due to memset_s() when using PCH
    
    Define __STDC_WANT_LIB_EXT1__ in wx/platform.h, which is included before
    the standard headers even when using PCH, to make sure memset_s()
    declaration is available in this case too.
    
    Closes #24687.
    
  • 82689eee
    by Vadim Zeitlin at 2025-10-31T14:56:40+01:00
    Remove "const" from GetMinSizeFromKnownDirection() documentation
    
    This doesn't correspond to the actual function which is non-const.
    
    Closes #25937.
    

3 changed files:

Changes:

  • include/wx/platform.h
    ... ... @@ -269,6 +269,12 @@
    269 269
     #        if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG)
    
    270 270
     #            define wxSIZE_T_IS_ULONG
    
    271 271
     #        endif
    
    272
    +
    
    273
    +        /* Define this as soon as possible and before string.h is included to
    
    274
    +           get memset_s() declaration from it if available. */
    
    275
    +#       ifndef __STDC_WANT_LIB_EXT1__
    
    276
    +#           define __STDC_WANT_LIB_EXT1__ 1
    
    277
    +#       endif
    
    272 278
     #    endif
    
    273 279
     
    
    274 280
     /*
    

  • interface/wx/window.h
    ... ... @@ -1441,7 +1441,7 @@ public:
    1441 1441
         virtual wxSize
    
    1442 1442
         GetMinSizeFromKnownDirection(int direction,
    
    1443 1443
                                      int size,
    
    1444
    -                                 int availableOtherDir) const;
    
    1444
    +                                 int availableOtherDir);
    
    1445 1445
     
    
    1446 1446
         /**
    
    1447 1447
             Returns the maximum size of window's client area.
    

  • src/unix/utilsunx.cpp
    ... ... @@ -18,10 +18,6 @@
    18 18
     // for compilers that support precompilation, includes "wx.h".
    
    19 19
     #include "wx/wxprec.h"
    
    20 20
     
    
    21
    -// Define this as soon as possible and before string.h is included to get
    
    22
    -// memset_s() declaration from it if available.
    
    23
    -#define __STDC_WANT_LIB_EXT1__ 1
    
    24
    -
    
    25 21
     #include "wx/utils.h"
    
    26 22
     
    
    27 23
     #if !defined(HAVE_SETENV) && defined(HAVE_PUTENV)
    

Reply all
Reply to author
Forward
0 new messages