[Mailagent-svn] SF.net SVN: mailagent:[58] trunk/mailagent/agent/filter
Brought to you by:
rmanfredi
From: <rma...@us...> - 2008-08-19 08:44:10
|
Revision: 58 http://mailagent.svn.sourceforge.net/mailagent/?rev=58&view=rev Author: rmanfredi Date: 2008-08-19 08:44:07 +0000 (Tue, 19 Aug 2008) Log Message: ----------- Applied patch from Barry Friedman to let filter compile on FreeBSD: must not include <malloc.h> when <stdlib.h> is available. Modified Paths: -------------- trunk/mailagent/agent/filter/environ.c trunk/mailagent/agent/filter/hash.c trunk/mailagent/agent/filter/io.c trunk/mailagent/agent/filter/logfile.c trunk/mailagent/agent/filter/misc.c Modified: trunk/mailagent/agent/filter/environ.c =================================================================== --- trunk/mailagent/agent/filter/environ.c 2008-07-02 21:59:34 UTC (rev 57) +++ trunk/mailagent/agent/filter/environ.c 2008-08-19 08:44:07 UTC (rev 58) @@ -46,11 +46,15 @@ #else #include <strings.h> #endif +#ifdef I_STDLIB +#include <stdlib.h> +#else #ifdef I_MALLOC #include <malloc.h> #else extern char *malloc(); /* Memory allocation */ #endif +#endif /* I_STDLIB */ #include "confmagic.h" #define ENV_VARS 200 /* An average number of environment vars */ Modified: trunk/mailagent/agent/filter/hash.c =================================================================== --- trunk/mailagent/agent/filter/hash.c 2008-07-02 21:59:34 UTC (rev 57) +++ trunk/mailagent/agent/filter/hash.c 2008-08-19 08:44:07 UTC (rev 58) @@ -30,9 +30,15 @@ #include "config.h" #include "portable.h" +#ifdef I_STDLIB +#include <stdlib.h> +#else #ifdef I_MALLOC #include <malloc.h> +#else +extern char *malloc(); /* Memory allocation */ #endif +#endif /* I_STDLIB */ #ifdef I_STRING #include <string.h> Modified: trunk/mailagent/agent/filter/io.c =================================================================== --- trunk/mailagent/agent/filter/io.c 2008-07-02 21:59:34 UTC (rev 57) +++ trunk/mailagent/agent/filter/io.c 2008-08-19 08:44:07 UTC (rev 58) @@ -105,11 +105,15 @@ #include <unistd.h> /* R_OK and friends */ #endif +#ifdef I_STDLIB +#include <stdlib.h> +#else #ifdef I_MALLOC #include <malloc.h> #else -extern char *malloc(); +extern char *malloc(); /* Memory allocation */ #endif +#endif /* I_STDLIB */ #ifdef I_SYS_WAIT #include <sys/wait.h> Modified: trunk/mailagent/agent/filter/logfile.c =================================================================== --- trunk/mailagent/agent/filter/logfile.c 2008-07-02 21:59:34 UTC (rev 57) +++ trunk/mailagent/agent/filter/logfile.c 2008-08-19 08:44:07 UTC (rev 58) @@ -48,9 +48,15 @@ #include <errno.h> #include <sys/types.h> +#ifdef I_STDLIB +#include <stdlib.h> +#else #ifdef I_MALLOC #include <malloc.h> +#else +extern char *malloc(); /* Memory allocation */ #endif +#endif /* I_STDLIB */ #ifdef I_TIME # include <time.h> Modified: trunk/mailagent/agent/filter/misc.c =================================================================== --- trunk/mailagent/agent/filter/misc.c 2008-07-02 21:59:34 UTC (rev 57) +++ trunk/mailagent/agent/filter/misc.c 2008-08-19 08:44:07 UTC (rev 58) @@ -41,11 +41,15 @@ #include <stdio.h> +#ifdef I_STDLIB +#include <stdlib.h> +#else #ifdef I_MALLOC #include <malloc.h> #else -extern char *malloc(); +extern char *malloc(); /* Memory allocation */ #endif +#endif /* I_STDLIB */ #ifdef I_STRING #include <string.h> @@ -53,10 +57,6 @@ #include <strings.h> #endif -#ifdef I_STDLIB -#include <stdlib.h> -#endif - #include <ctype.h> #include "sysexits.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |