summaryrefslogtreecommitdiff
path: root/m4/ssize_t.m4
blob: 2e8626cf97e70c21f853b978c9c6cd0a23f12a8f (plain)
1
2
3
4
5
6
7
8
9
10
11
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])