libbb/create_icmp6.socket.c: why is entire code conditional?

Jason Schoon floydpink at gmail.com
Sun Mar 26 08:49:45 PST 2006


I'd vote for #2 in this case, given that the entire file is dependent on a
config variable.

On 3/26/06, Robert P. J. Day <rpjday at mindspring.com> wrote:
>
>
>   i'm a bit weirded out by the fact that the entirety of the source in
> the file libbb/create_icmp6_socket.c is conditionally included by
>
>   #ifdef CONFIG_FEATURE_IPV6
>   ...
>   #endif
>
> that strikes me as unnecessarily obtuse.  it would seem to make more
> sense to do one of two things:
>
> 1) combine both create_icmp_socket.c and create_icmp6_socket.c into a
> single source file, and put the conditional inclusion of the IPV6
> stuff in *that* file, or
>
> 2) remove the conditional inclusion and use the typical entry in
> Makefile.in of
>
>   LIBBB-$(CONFIG_FEATURE_IPV6)+= create_icmp6_socket.c
>
>
>   either one of those would seem to be a cleaner technique.
>
> rday
>
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/busybox/attachments/20060326/b2d2da6e/attachment-0001.html


More information about the busybox mailing list