summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/defines.h b/defines.h
index d2f61e26..9c88f2e8 100644
--- a/defines.h
+++ b/defines.h
@@ -3,9 +3,13 @@
/* Necessary headers */
-#include <sys/types.h> /* For u_intXX_t */
+#include <sys/types.h>
#include <sys/socket.h> /* For SHUT_XXXX */
+#ifdef HAVE_SYS_BITYPES_H
+# include <sys/bitypes.h> /* For u_intXX_t */
+#endif
+
#ifdef HAVE_PATHS_H
# include <paths.h> /* For _PATH_XXX */
#endif
@@ -232,4 +236,13 @@ typedef unsigned int size_t;
# define PAM_STRERROR(a,b) pam_strerror((a),(b))
#endif
+/* Solaris doesn't have a public [v]snprintf() function, but it has */
+/* __[v]snprintf() */
+#if !defined(HAVE_SNPRINTF) && defined(HAVE___SNPRINTF)
+# define snprintf __snprintf
+#endif /* !defined(HAVE_SNPRINTF) && defined(HAVE___SNPRINTF) */
+#if !defined(HAVE_VSNPRINTF) && defined(HAVE___VSNPRINTF)
+# define vsnprintf __vsnprintf
+#endif /* !defined(HAVE_VSNPRINTF) && defined(HAVE___VSNPRINTF) */
+
#endif /* _DEFINES_H */