diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /m4/crypt_xpg6.m4 | |
parent | Initial commit. (diff) | |
download | dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/crypt_xpg6.m4')
-rw-r--r-- | m4/crypt_xpg6.m4 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/m4/crypt_xpg6.m4 b/m4/crypt_xpg6.m4 new file mode 100644 index 0000000..9a86f46 --- /dev/null +++ b/m4/crypt_xpg6.m4 @@ -0,0 +1,23 @@ +dnl * Check for crypt() if unistd.h compiles with _XOPEN_SOURCE + _XPG6 +dnl * Add other macros there too "just in case". +AC_DEFUN([DOVECOT_CRYPT_XPG6], [ + AC_CACHE_CHECK([if we should use _XPG6 macro for crypt()],i_cv_use_xpg6_crypt,[ + AC_TRY_COMPILE([ + #define _XOPEN_SOURCE 4 + #define _XOPEN_SOURCE_EXTENDED 1 + #define _XOPEN_VERSION 4 + #define _XPG4_2 + #define _XPG6 + #include <unistd.h> + ], [ + crypt("a", "b"); + ], [ + i_cv_use_xpg6_crypt=yes + ], [ + i_cv_use_xpg6_crypt=no + ]) + ]) + if test $i_cv_use_xpg6_crypt = yes; then + AC_DEFINE(CRYPT_USE_XPG6,, [Define if _XPG6 macro is needed for crypt()]) + fi +]) |