fix Darwin compilation.

This commit is contained in:
Vitor Santos Costa 2009-06-01 21:30:44 -05:00
parent 93a74d4224
commit 662dcde178

View File

@ -2368,7 +2368,7 @@ findExecutable(const char *av0, char *buffer)
return NULL; return NULL;
file = Which(buf, tmp); file = Which(buf, tmp);
#if __unix__ /* argv[0] can be an #! script! */ #if __unix__ || __APPLE__ /* argv[0] can be an #! script! */
if ( file ) if ( file )
{ int n, fd; { int n, fd;
char buf[MAXPATHLEN]; char buf[MAXPATHLEN];
@ -2403,7 +2403,7 @@ findExecutable(const char *av0, char *buffer)
#endif /*__WINDOWS__*/ #endif /*__WINDOWS__*/
#ifdef __unix__ #if __unix__ || __APPLE__
static char * static char *
okToExec(const char *s) okToExec(const char *s)
{ struct stat stbuff; { struct stat stbuff;