From e3a93db0a674169ac30ff53f24948d9ad753f710 Mon Sep 17 00:00:00 2001 From: damien Date: Tue, 28 Dec 1999 23:36:45 +0000 Subject: [PATCH] - Detect missing size_t and typedef it. --- ChangeLog | 1 + acconfig.h | 1 + configure.in | 12 ++++++++++++ defines.h | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2947cc7c..e9f03e24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ Nalin Dahyabhai - Calls to pam_setcred, patch from Nalin Dahyabhai + - Detect missing size_t and typedef it. 19991228 - Replacement for getpagesize() for systems which lack it diff --git a/acconfig.h b/acconfig.h index c64eb72a..3b37c594 100644 --- a/acconfig.h +++ b/acconfig.h @@ -113,6 +113,7 @@ #undef HAVE_U_INTXX_T #undef HAVE_UINTXX_T #undef HAVE_SOCKLEN_T +#undef HAVE_SIZE_T /* Define if you have /dev/ptmx */ #undef HAVE_DEV_PTMX diff --git a/configure.in b/configure.in index 581380ae..3b1f125c 100644 --- a/configure.in +++ b/configure.in @@ -192,6 +192,18 @@ AC_TRY_COMPILE( [AC_MSG_RESULT(no)] ) +AC_MSG_CHECKING([For size_t]) +AC_TRY_COMPILE( + [#include ], + [#include ], + [size_t foo; foo = 1235;], + [ + AC_DEFINE(HAVE_SIZE_T) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] +) + AC_ARG_WITH(pam, [ --without-pam Disable PAM support ], [ diff --git a/defines.h b/defines.h index 1437e7b2..1a663997 100644 --- a/defines.h +++ b/defines.h @@ -106,6 +106,10 @@ typedef int64_t quad_t; typedef unsigned int socklen_t; #endif /* HAVE_SOCKLEN_T */ +#ifndef HAVE_SIZE_T +typedef unsigned int size_t; +#endif /* HAVE_SIZE_T */ + /* Paths */ /* If _PATH_LASTLOG is not defined by system headers, set it to the */ -- 2.45.2