gabriel rosenkoetter on Mon, 13 May 2002 16:33:51 -0400


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

Re: [PLUG] Mac OS/X, Darwin and Opensource software...


On Mon, May 13, 2002 at 04:19:00PM -0400, Kyle R . Burton wrote:
> The errors this user reported were:
> 
>   localealias.c: In function `read_alias_file':
>   localealias.c:351: void value not ignored as it ought to be
>   localealias.c:355: void value not ignored as it ought to be

Sounds like a dumb error output rather than a dumb memcpy()
prototype. (Unless... is this the libc memcpy() or the kernel
memcpy()? The kernel might have good reason to have a different
prototype based on the MACH-ness of Darwin.)

What's the C compiler involved here?

> Which leads me to beleive that memcpy is prototyped as:
> 
>    void memcpy(void*,void*,size_t)

Doubtful. But possible.

> On my Linux system (and everywhere else that I know of).

Not everywhere. Look into the machine-dependent code on anything
that runs on a PowerPC some time.

>     map[nmap].alias = memcpy (&string_space[string_space_act], /* 351 */
>       alias, alias_len);
>     string_space_act += alias_len;


Try map[nmap].alias = (char *) memcpy (&...);

> to be completely correct, but autoconf/gcc does build the software 
> successfuly under a bunch of different systems (including Linux, HP-UX, 
> Solaris, and some of the BSDs),

... where, I assume, you're using gcc?

gcc accepts a lot of things that are not, properly ANSI C. That
doesn't make them any less Wrong.

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgpEAinargQgj.pgp
Description: PGP signature