summary refs log tree commit diff stats
path: root/libotr/libgpg-error-1.42/m4/gnupg-misc.m4
diff options
context:
space:
mode:
Diffstat (limited to 'libotr/libgpg-error-1.42/m4/gnupg-misc.m4')
-rw-r--r--libotr/libgpg-error-1.42/m4/gnupg-misc.m435
1 files changed, 35 insertions, 0 deletions
diff --git a/libotr/libgpg-error-1.42/m4/gnupg-misc.m4 b/libotr/libgpg-error-1.42/m4/gnupg-misc.m4
new file mode 100644
index 0000000..c707b35
--- /dev/null
+++ b/libotr/libgpg-error-1.42/m4/gnupg-misc.m4
@@ -0,0 +1,35 @@
+dnl gnupg-misc.m4 - Autoconf macros originally from GnuPG
+dnl Copyright (C) 2017 g10 Code GmbH
+dnl
+dnl This file is free software; as a special exception the author gives
+dnl unlimited permission to copy and/or distribute it, with or without
+dnl modifications, as long as this notice is preserved.
+dnl
+dnl This file is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+dnl SPDX-License-Identifier: FSFULLR
+
+
+dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
+dnl of the usual 2.
+AC_DEFUN([GNUPG_FUNC_MKDIR_TAKES_ONE_ARG],
+[AC_CHECK_HEADERS(sys/stat.h unistd.h direct.h)
+AC_CACHE_CHECK([if mkdir takes one argument], gnupg_cv_mkdir_takes_one_arg,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef HAVE_DIRECT_H
+# include <direct.h>
+#endif]], [[mkdir ("foo", 0);]])],
+        gnupg_cv_mkdir_takes_one_arg=no, gnupg_cv_mkdir_takes_one_arg=yes)])
+if test $gnupg_cv_mkdir_takes_one_arg = yes ; then
+  AC_DEFINE(MKDIR_TAKES_ONE_ARG,1,
+            [Defined if mkdir() does not take permission flags])
+fi
+])