[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: zmailer-2.99.23 build on Linux - missed MAXPATHLEN def

This is a curious problem,

> Just a note on zmailer-2.99.23 (I think this was also left out as far
> back as 2.99.15 ...) for a Linux build.
> MAXPATHLEN is left undefined in transports/libta and transports/mailbox :
> ...
> ctlopen.c: In function `ctlopen':
> ctlopen.c:219: `PATH_MAX' undeclared (first use this function)
> ...
> In file included from mailbox.c:67:
> dotlock.c:32: `PATH_MAX' undeclared (first use this function)
> For Linux (at least with a SlackWare dist, and under Linux v 1.3.52),
>   <sys/param.h>:		#define MAXPATHLEN      PATH_MAX
> which is resolved in
>   <linux/limits.h>:	#define PATH_MAX        1024

	..because the <sys/param.h>  does include the <linux/limits.h>
	unconditionally at its begin..

	(At least with my libc-5.3.0 -- I know, it is bleeding-edge-
	 stuff... -- oops, GDBM is not anymore at the libc ...)

	Umm.. 4.5.26 (Dec-93) doesn't do that unconditional include..
	(yeah, I found one old machine..)

> A quick fix was to just add <linux/limits.h> to both ctlopen.c and
> dotlock.c  (but there ought to be a better way to avoid an obvious
> architecture dependency like this :-)

	.. and libc version dependent :-/  You have 4.x ?

> Aside from that, zmailer built without further snags.
> Cheers,
> --
> James S. MacKinnon           Office: P-139 Avahd-Bhatia Physics Lab
> University of Alberta        email : Jim.MacKinnon@Phys.UAlberta.CA

	/Matti Aarnio <mea@nic.funet.fi>