diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/messaging/messaging.c | 1 | ||||
-rw-r--r-- | source4/lib/replace/win32.m4 | 20 | ||||
-rw-r--r-- | source4/lib/util.c | 3 |
3 files changed, 23 insertions, 1 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 70eb2e7680..6209c36554 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -22,6 +22,7 @@ #include "includes.h" #include "lib/events/events.h" +#include "system/dir.h" #include "system/filesys.h" #include "system/time.h" #include "messages.h" diff --git a/source4/lib/replace/win32.m4 b/source4/lib/replace/win32.m4 new file mode 100644 index 0000000000..6b9c4e6b13 --- /dev/null +++ b/source4/lib/replace/win32.m4 @@ -0,0 +1,20 @@ +AC_CHECK_HEADERS(direct.h) + +####################################### +# Check for mkdir mode +AC_CACHE_CHECK( [whether mkdir supports mode], ac_mkdir_has_mode, + AC_TRY_COMPILE([ + #include <stdio.h> + #ifdef HAVE_DIRECT_H + #include <direct.h> + #endif],[ + mkdir("foo",0777); + return 0; + ], + ac_mkdir_has_mode="yes", + ac_mkdir_has_mode="no") ) + +if test "$ac_mkdir_has_mode" = "yes" +then + AC_DEFINE(HAVE_MKDIR_MODE, 1, [Define if target mkdir supports mode option]) +fi diff --git a/source4/lib/util.c b/source4/lib/util.c index 59d83a966a..ba2c0e1ae4 100644 --- a/source4/lib/util.c +++ b/source4/lib/util.c @@ -26,9 +26,10 @@ #include "dynconfig.h" #include "system/network.h" #include "system/iconv.h" +#include "system/dir.h" #include "system/filesys.h" -/**************************************************************************n +/*************************************************************************** Find a suitable temporary directory. The result should be copied immediately as it may be overwritten by a subsequent call. ****************************************************************************/ |