[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH 7/7] libbb.h: Handle missing HOST_NAME_MAX; ensure MAXFOOLEN agrees with FOO_MAX



[Dropping debian-bsd@lists.debian.org, as this patch only affects the Hurd]

On 8 Oct 2017, at 12:28, Kang-Che Sung <explorer09@gmail.com> wrote:
> 2017年10月8日 18:59,"James Clarke" <jrtc27@jrtc27.com>寫道:
>> That's not actually true (any more); util-linux/fdisk_osf.c, whilst
>> Linux-specific, does use MAXPATHLEN, and networking/traceroute.c uses
>> MAXHOSTNAMELEN. These could be changed to use {PATH,HOST_NAME}_MAX, but it's
>> highly likely that a future change will re-introduce a use of one of those
>> macros and break the build on the Hurd, so why not just define them?
> 
> Let's assume that Linux will provide these non-standard macros. You won't build them in Hurd, so why bother?
> 
> The problem is that you can't assume the meanings and usage of two macros are both the same. You might potentially break more for your "convenience" definition that's technically unnecessary.

Ok, fine, I will change networking/traceroute.c to use HOST_NAME_MAX. Would you
rather I left util-linux/fdisk_osf.c alone, or changed it to use PATH_MAX?
It's the only thing using MAXPATHLEN.

Regards,
James


Reply to: