[Git][wxwidgets/wxwidgets][master] 2 commits: Provide default value for wxMkDir() "mode" under all platforms

0 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Dec 22, 2025, 8:55:16 PM (9 hours ago) Dec 22
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • cb03467f
    by Vadim Zeitlin at 2025-12-21T22:44:42+01:00
    Provide default value for wxMkDir() "mode" under all platforms
    
    Previously this function could be called with just path only under
    Windows and not when using Cygwin. Make it possible to always omit mode
    and use the appropriate default value in this case.
    
    This improves consistency and fixes build of wxWidgets itself under
    Cygwin.
    
    Closes #26042.
    
  • fb06c6da
    by Vadim Zeitlin at 2025-12-23T02:49:19+01:00
    Regenerate configure after EGL-related changes
    
    Somehow this was forgotten at some moment and --disable-glcanvasegl
    option didn't appear in configure itself in spite of being in
    configure.ac since a long time.
    

2 changed files:

Changes:

  • configure
    ... ... @@ -1362,6 +1362,7 @@ enable_accessibility
    1362 1362
     enable_uiactionsim
    
    1363 1363
     enable_dctransform
    
    1364 1364
     enable_webviewwebkit
    
    1365
    +enable_glcanvasegl
    
    1365 1366
     enable_palette
    
    1366 1367
     enable_image
    
    1367 1368
     enable_gif
    
    ... ... @@ -2338,6 +2339,7 @@ Optional Features:
    2338 2339
       --enable-uiactionsim    use wxUIActionSimulator
    
    2339 2340
       --enable-dctransform    use wxDC::SetTransformMatrix and related
    
    2340 2341
       --enable-webviewwebkit  use wxWebView WebKit backend
    
    2342
    +  --disable-glcanvasegl   disable wxGLCanvas EGL backend
    
    2341 2343
       --enable-palette        use wxPalette class
    
    2342 2344
       --enable-image          use wxImage class
    
    2343 2345
       --enable-gif            use gif images (GIF file format)
    
    ... ... @@ -12372,6 +12374,35 @@ fi
    12372 12374
               eval "$wx_cv_use_webviewwebkit"
    
    12373 12375
     
    
    12374 12376
     
    
    12377
    +          enablestring=
    
    12378
    +          defaultval=$wxUSE_ALL_FEATURES
    
    12379
    +          if test -z "$defaultval"; then
    
    12380
    +              if test x"$enablestring" = xdisable; then
    
    12381
    +                  defaultval=yes
    
    12382
    +              else
    
    12383
    +                  defaultval=no
    
    12384
    +              fi
    
    12385
    +          fi
    
    12386
    +
    
    12387
    +          # Check whether --enable-glcanvasegl was given.
    
    12388
    +if test "${enable_glcanvasegl+set}" = set; then :
    
    12389
    +  enableval=$enable_glcanvasegl;
    
    12390
    +                          if test "$enableval" = yes; then
    
    12391
    +                            wx_cv_use_glcanvasegl='wxUSE_GLCANVAS_EGL=yes'
    
    12392
    +                          else
    
    12393
    +                            wx_cv_use_glcanvasegl='wxUSE_GLCANVAS_EGL=no'
    
    12394
    +                          fi
    
    12395
    +
    
    12396
    +else
    
    12397
    +
    
    12398
    +                          wx_cv_use_glcanvasegl='wxUSE_GLCANVAS_EGL=${'DEFAULT_wxUSE_GLCANVAS_EGL":-$defaultval}"
    
    12399
    +
    
    12400
    +fi
    
    12401
    +
    
    12402
    +
    
    12403
    +          eval "$wx_cv_use_glcanvasegl"
    
    12404
    +
    
    12405
    +
    
    12375 12406
     
    
    12376 12407
     
    
    12377 12408
               enablestring=
    
    ... ... @@ -31267,6 +31298,7 @@ fi
    31267 31298
                             OPENGL_LIBS="-lGL"
    
    31268 31299
     
    
    31269 31300
                             if test "$WXGTK3" = 1; then
    
    31301
    +                            if test "$wxUSE_GLCANVAS_EGL" != "no"; then
    
    31270 31302
     
    
    31271 31303
     pkg_failed=no
    
    31272 31304
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egl >= 1.4" >&5
    
    ... ... @@ -31327,7 +31359,7 @@ fi
    31327 31359
         echo "$EGL_PKG_ERRORS" >&5
    
    31328 31360
     
    
    31329 31361
     
    
    31330
    -                                    { $as_echo "$as_me:${as_lineno-$LINENO}: EGL 1.4+ not available. Will use GLX." >&5
    
    31362
    +                                        { $as_echo "$as_me:${as_lineno-$LINENO}: EGL 1.4+ not available. Will use GLX." >&5
    
    31331 31363
     $as_echo "$as_me: EGL 1.4+ not available. Will use GLX." >&6;}
    
    31332 31364
     
    
    31333 31365
     
    
    ... ... @@ -31335,7 +31367,7 @@ elif test $pkg_failed = untried; then
    31335 31367
             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    31336 31368
     $as_echo "no" >&6; }
    
    31337 31369
     
    
    31338
    -                                    { $as_echo "$as_me:${as_lineno-$LINENO}: EGL 1.4+ not available. Will use GLX." >&5
    
    31370
    +                                        { $as_echo "$as_me:${as_lineno-$LINENO}: EGL 1.4+ not available. Will use GLX." >&5
    
    31339 31371
     $as_echo "$as_me: EGL 1.4+ not available. Will use GLX." >&6;}
    
    31340 31372
     
    
    31341 31373
     
    
    ... ... @@ -31345,8 +31377,8 @@ else
    31345 31377
             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    
    31346 31378
     $as_echo "yes" >&6; }
    
    31347 31379
     
    
    31348
    -                                    OPENGL_LIBS="$OPENGL_LIBS $EGL_LIBS"
    
    31349
    -                                    $as_echo "#define wxHAS_EGL 1" >>confdefs.h
    
    31380
    +                                        OPENGL_LIBS="$OPENGL_LIBS $EGL_LIBS"
    
    31381
    +                                        $as_echo "#define wxHAS_EGL 1" >>confdefs.h
    
    31350 31382
     
    
    31351 31383
     
    
    31352 31384
     pkg_failed=no
    
    ... ... @@ -31420,17 +31452,18 @@ else
    31420 31452
             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    
    31421 31453
     $as_echo "yes" >&6; }
    
    31422 31454
     
    
    31423
    -                                            if test $wx_cv_gdk_wayland = "yes"; then
    
    31424
    -                                                OPENGL_LIBS="$OPENGL_LIBS $WAYLAND_EGL_LIBS"
    
    31425
    -                                                have_wayland=1
    
    31426
    -                                            fi
    
    31455
    +                                                if test $wx_cv_gdk_wayland = "yes"; then
    
    31456
    +                                                    OPENGL_LIBS="$OPENGL_LIBS $WAYLAND_EGL_LIBS"
    
    31457
    +                                                    have_wayland=1
    
    31458
    +                                                fi
    
    31427 31459
     
    
    31428 31460
     fi
    
    31429 31461
     
    
    31430 31462
     fi
    
    31431
    -                            if test "$have_wayland" != 1; then
    
    31432
    -                                { $as_echo "$as_me:${as_lineno-$LINENO}: wxGLCanvas will not have Wayland support" >&5
    
    31463
    +                                if test "$have_wayland" != 1; then
    
    31464
    +                                    { $as_echo "$as_me:${as_lineno-$LINENO}: wxGLCanvas will not have Wayland support" >&5
    
    31433 31465
     $as_echo "$as_me: wxGLCanvas will not have Wayland support" >&6;}
    
    31466
    +                                fi
    
    31434 31467
                                 fi
    
    31435 31468
                             fi
    
    31436 31469
                     fi
    

  • include/wx/filefn.h
    ... ... @@ -381,7 +381,7 @@ inline int wxRmDir(const wxString& path)
    381 381
     inline int wxMkDir(const wxString& path, mode_t WXUNUSED(mode) = 0)
    
    382 382
         { return wxCRT_MkDir(path.fn_str()); }
    
    383 383
     #else
    
    384
    -inline int wxMkDir(const wxString& path, mode_t mode)
    
    384
    +inline int wxMkDir(const wxString& path, mode_t mode = 0777)
    
    385 385
         { return wxCRT_MkDir(path.fn_str(), mode); }
    
    386 386
     #endif
    
    387 387
     
    

Reply all
Reply to author
Forward
0 new messages