]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pam: Fixed compiler warning with BSDs.
authorTimo Sirainen <tss@iki.fi>
Sun, 26 Jul 2009 22:00:44 +0000 (18:00 -0400)
committerTimo Sirainen <tss@iki.fi>
Sun, 26 Jul 2009 22:00:44 +0000 (18:00 -0400)
--HG--
branch : HEAD

src/auth/passdb-pam.c

index c343e9dcb13560392eeec6e5437a97ab3f07a044..d1b050c48ddbb1a1d1c4bd00bbec87c9e3874ac6 100644 (file)
 #  include <pam/pam_appl.h>
 #endif
 
-#if !defined(_SECURITY_PAM_APPL_H) && !defined(LINUX_PAM) && !defined(_OPENPAM)
-/* Sun's PAM doesn't use const. we use a bit dirty hack to check it.
-   Originally it was just __sun__ check, but HP/UX also uses Sun's PAM
-   so I thought this might work better. */
-#  define SUNPAM
-#endif
-
-#ifdef SUNPAM
-#  define linux_const
+#if defined(sun) || defined(__sun__) || defined(_HPUX_SOURCE)
+#  define pam_const
 #else
-#  define linux_const                  const
+#  define pam_const const
 #endif
-typedef linux_const void *pam_item_t;
+
+typedef pam_const void *pam_item_t;
 
 #define PASSDB_PAM_DEFAULT_MAX_REQUESTS 100
 
@@ -62,7 +56,7 @@ struct pam_conv_context {
 };
 
 static int
-pam_userpass_conv(int num_msg, linux_const struct pam_message **msg,
+pam_userpass_conv(int num_msg, pam_const struct pam_message **msg,
                  struct pam_response **resp_r, void *appdata_ptr)
 {
        /* @UNSAFE */