[gimp] plug-ins: use g_mkdir() for generic cross-platform code.



commit 69fdcf5d3f60a5af4c2355a1d6578f648ee39e31
Author: Jehan <jehan girinstud io>
Date:   Sat Apr 24 17:03:43 2021 +0200

    plug-ins: use g_mkdir() for generic cross-platform code.
    
    This fixes the following error when building for Windows:
    
    > error: too many arguments to function ‘mkdir’
    
    On Windows, mkdir() is deprecated, it is an alias for _mkdir() which
    doesn't have a mode parameter. The GLib version duplicates the POSIX
    signature and is cross-platform (mode is simply ignored on Windows).

 plug-ins/script-fu/ftx/ftx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plug-ins/script-fu/ftx/ftx.c b/plug-ins/script-fu/ftx/ftx.c
index b1c1aa745e..f9de1bfdcc 100644
--- a/plug-ins/script-fu/ftx/ftx.c
+++ b/plug-ins/script-fu/ftx/ftx.c
@@ -274,7 +274,7 @@ pointer foreign_mkdir(scheme *sc, pointer args)
   else
     mode = 0777;
 
-  retcode = mkdir(dirname, (mode_t)mode);
+  retcode = g_mkdir(dirname, (mode_t)mode);
   if (retcode == 0)
     return sc->T;
   else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]