From: Wayne Davison Date: Thu, 21 Aug 2003 23:54:20 +0000 (+0000) Subject: Got rid of a duplicate include for malloc.h and improved the "do we X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/59192f5650565d9c6de0194863c6094621be1c93 Got rid of a duplicate include for malloc.h and improved the "do we need malloc.h" logic a bit more. (Trying to prevent #warning and #error problems on *BSD systems.) --- diff --git a/rsync.h b/rsync.h index 47943f30..3d10af6d 100644 --- a/rsync.h +++ b/rsync.h @@ -122,10 +122,10 @@ enum logcode {FNONE=0, FERROR=1, FINFO=2, FLOG=3 }; #ifdef HAVE_STDLIB_H #include -#else -#ifdef HAVE_MALLOC_H -#include #endif + +#if defined(HAVE_MALLOC_H) && (defined(HAVE_MALLINFO) || !defined(HAVE_STDLIB_H)) +#include #endif #ifdef HAVE_SYS_SOCKET_H @@ -196,10 +196,6 @@ enum logcode {FNONE=0, FERROR=1, FINFO=2, FLOG=3 }; #include #endif -#ifdef HAVE_MALLOC_H -# include -#endif - /* these are needed for the uid/gid mapping code */ #include #include