[OpenAFS-devel] Trying to code for Mac OS X
Garrett Wollman
wollman@khavrinen.csail.mit.edu
Wed, 25 Mar 2009 11:41:08 -0400
<<On Wed, 25 Mar 2009 14:08:28 +0100 (CET), Felix Frank <Felix.Frank@Desy.de> said:
> On Wed, 25 Mar 2009, Barry Fawthrop wrote:
>> This would throw and error about void * and char *
>>
>> I had to change to the following
>>
>> name = (char *)malloc(sizeof(name));
> I guess the code is sloppy that way here and there, yes.
Nothing sloppy about it, that's Standard ISO C. The mistake here
appears to be trying to compile C code with a C++ compiler. It is an
error to expect this to work. Despite the similarity in the names, C
and C++ are different languages and have different rules. Barry
should be using a C compiler to compile the C code in OpenAFS, and use
the C++ external-linkage feature to link his C++ code to the C
libraries.
-GAWollman