Csound Csound-dev Csound-tekno Search About

[Cs-dev] CS5 and OSX - dl_opcodes.c

Date2005-02-18 22:13
Fromsteven yi
Subject[Cs-dev] CS5 and OSX - dl_opcodes.c
Hi all,

I went to compile Csound5 on OSX today and got an error that some things 
in dl_opcodes.c were redefining things from dirent.h.  There is code in 
Top/dl_opcodes.c here:

#ifdef __MACH__
/* There is something odd on OSX about dirent.h */
typedef void* DIR;
DIR opendir(const char *);
struct dirent *readdir(DIR*);
int closedir(DIR*);
#endif

that if I take out allows me to finish compiling without problems.  Now, 
if I understand this message correctly, we can't do a simple check for a 
header.

The change looks like it was introduced by John ffitch in revision 1.29, 
dated 12/18/04.

The computer I am compiling on is OS X 10.3.8 (Panther).

Any suggestions on how to modify this code?

steven


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-02-19 10:38
Fromjpff@codemist.co.uk
SubjectRe: [Cs-dev] CS5 and OSX - dl_opcodes.c
>>>>> "steven" == steven yi  writes:

 steven> I went to compile Csound5 on OSX today and got an error that some things 
 steven> in dl_opcodes.c were redefining things from dirent.h.  There is code in 
 steven> Top/dl_opcodes.c here:

 steven> #ifdef __MACH__
 steven> /* There is something odd on OSX about dirent.h */
 steven> typedef void* DIR;
 steven> DIR opendir(const char *);
 steven> struct dirent *readdir(DIR*);
 steven> int closedir(DIR*);
 steven> #endif

 steven> that if I take out allows me to finish compiling without problems.  Now, 
 steven> if I understand this message correctly, we can't do a simple check for a 
 steven> header.

 steven> The change looks like it was introduced by John ffitch in revision 1.29, 
 steven> dated 12/18/04.

 steven> The computer I am compiling on is OS X 10.3.8 (Panther).

I am using 10.2, and introduced that code so it would compile.  I
think that the comment should tell the story!
  Sounds like there is a change between 10.1, 10.2 and 10.3 and the
only safe solution is the #if depending on version -- not sure if that
information is clear -- Mac not on yet

==John ffitch


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net