summaryrefslogtreecommitdiff
path: root/m4/ssize_t.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/ssize_t.m4')
-rw-r--r--m4/ssize_t.m412
1 files changed, 12 insertions, 0 deletions
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
new file mode 100644
index 0000000..a92f61a
--- /dev/null
+++ b/m4/ssize_t.m4
@@ -0,0 +1,12 @@
+dnl Checks for type ssize_t
+dnl Defines HAVE_SSIZE_T on success.
+AC_DEFUN(AC_TYPE_SSIZE_T,
+[AC_CACHE_CHECK([for type ssize_t], ac_cv_type_ssize_t,
+ [AC_TRY_COMPILE([#include <sys/types.h>], [ssize_t s;],
+ [ac_cv_type_ssize_t=yes],
+ [ac_cv_type_ssize_t=no])])
+if test $ac_cv_type_ssize_t = yes; then
+ AC_DEFINE(HAVE_SSIZE_T, 1, [Define if you have ssize_t])
+else
+ AC_DEFINE(NO_SSIZE_T, 1, [Define if you don't have ssize_t])
+fi])