We discussed here that out of the box FriCAS build fails no
newest MinGW due to 'mkdir'. Attached is patch that tries to
fix this.
If I get confirmation (say to Friday) that the patch helps I
will include it in the new release. Othewise I will release
without it.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/E1goqg5-0004bk-AB%40hera.math.uni.wroc.pl.
For more options, visit https://groups.google.com/d/optout.
Index: config/fricas_c_macros.h.in
===================================================================
--- config/fricas_c_macros.h.in (revision 2550)
+++ config/fricas_c_macros.h.in (working copy)
@@ -121,6 +121,9 @@
/* Define to 1 if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
+/* Host has two arg mkdir */
+#undef HAVE_TWO_ARG_MKDIR
+
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
Index: configure.ac
===================================================================
--- configure.ac (revision 2550)
+++ configure.ac (working copy)
@@ -550,6 +550,13 @@
],
[AC_DEFINE([HAVE_EPIPE], [1], [Host has EPIPE])],[])
+AC_TRY_COMPILE([
+#include <sys/stat.h>
+#include <sys/types.h>
+ ], [
+int code = mkdir ("./foo", (S_IRWXU | S_IRWXO | S_IRWXG));
+ ],
+ [AC_DEFINE([HAVE_TWO_ARG_MKDIR], [1], [Host has two arg mkdir])], [])
if test x$fricas_host_has_socket != xyes; then \
AC_MSG_ERROR([FriCAS needs support for sockets.])
Index: src/lib/cfuns-c.c
===================================================================
--- src/lib/cfuns-c.c (revision 2550)
+++ src/lib/cfuns-c.c (working copy)
@@ -110,7 +110,7 @@
int
makedir(char *path)
{
-#ifdef S_IRWXO
+#ifdef HAVE_TWO_ARG_MKDIR
return ( mkdir (path,(S_IRWXU | S_IRWXO | S_IRWXG)) );
#else
return ( mkdir (path) );