Ethereal-dev: Re: [ethereal-dev] 'roundup' macro error on build

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Fri, 12 Nov 1999 02:09:36 -0800
> Started with fresh CVS fetch, using gcc-2.95 to build under Linux:
> 
> gcc -DHAVE_CONFIG_H -I. -I. -I.   -I. -I./wiretap -I/usr/local/include
> -Wall -g -O2 -I. -I./wiretap -I/usr/local/include -I/usr/X11R6/include
> -I/usr/local/lib/glib/include -I/usr/local/include -c
> packet-bootparams.c
> In file included from packet-bootparams.c:42:
> packet-rpc.h:99: macro `roundup' used with just one arg

Various flavors of UNIX have a "roundup()" macro that takes two
arguments, and returns a value that's the first argument rounded up to a
multiple of the second argument; it's defined in <sys/param.h> in BSD,
but it may be defined in some other header file in at least some Linux
distributions, and "packet-bootparams.c" may end up including that
header file.

The "roundup()" function in "packet-rpc.c", declared in "packet-rpc.h",
should perhaps be renamed (it rounds up its argument to a multiple of 4)
so as not to collide with any "roundup()" defined by the OS.