[PATCH] [FreeBSD 9] Add HAVE_ define for intptr_t

Timur I. Bakeyev timur at com.bat.ru
Mon Jun 8 23:06:21 GMT 2009


Hi, Stefan!

On Mon, Jun 08, 2009 at 10:43:46AM +0200, Stefan (metze) Metzmacher wrote:
> Timur I. Bakeyev schrieb:
> > There are still(?) pieces in the code that use HAVE_INTPTR_T define, but
> > apparently, we never defined it.
> > 
> We already have this in lib/replace/libreplace_cc.m4
> AC_CHECK_TYPES([intptr_t, uintptr_t, ptrdiff_t])
> 
> master3/source3$ grep HAVE_INTPTR_T include/*.h
> include/config.h:#define HAVE_INTPTR_T 1

I guess, we both right here - git HEAD uses AC_CHECK_TYPES(), which,
amoung other things, defines corresponding HAVE_* macro, but all the
realeases up to latest 3.4.0pre2 use older macro - AC_CHECK_TYPE(),
which doesn't do that.. So, future releases may have these macros
defined, but not sure, in which branches? 3.0, 3.2, 3.4?

Also, it maybe worth mentioning, that there are a bit more complex and
extensive checks for this particular types, than AC_CHECK_TYPES:

AC_TYPE_INTPTR_T
AC_TYPE_UINTPTR_T
AM_TYPE_PTRDIFF_T

They not just check validity of the types, but also define them, if they 
are missing. That's true at least for autoconf 2.62.

With best regards,
Timur Bakeyev.


More information about the samba-technical mailing list