Commit 50eec804 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

accommodate OSX for stat.h

parent 9a0036a1
...@@ -509,9 +509,9 @@ void sys_findprogdir(char *progname) ...@@ -509,9 +509,9 @@ void sys_findprogdir(char *progname)
{ {
char sbuf[FILENAME_MAX], sbuf2[FILENAME_MAX]; char sbuf[FILENAME_MAX], sbuf2[FILENAME_MAX];
//char *lastslash; //char *lastslash;
#ifdef UNISTD #ifndef MSW
struct stat statbuf; struct stat statbuf;
#endif #endif /* NOT MSW */
/* find out by what string Pd was invoked; put answer in "sbuf". */ /* find out by what string Pd was invoked; put answer in "sbuf". */
#ifdef MSW #ifdef MSW
...@@ -519,10 +519,10 @@ void sys_findprogdir(char *progname) ...@@ -519,10 +519,10 @@ void sys_findprogdir(char *progname)
sbuf2[FILENAME_MAX-1] = 0; sbuf2[FILENAME_MAX-1] = 0;
sys_unbashfilename(sbuf2, sbuf); sys_unbashfilename(sbuf2, sbuf);
#endif /* MSW */ #endif /* MSW */
#ifdef UNISTD #ifndef MSW
strncpy(sbuf, progname, FILENAME_MAX); strncpy(sbuf, progname, FILENAME_MAX);
sbuf[FILENAME_MAX-1] = 0; sbuf[FILENAME_MAX-1] = 0;
#endif #endif /* NOT MSW */
#ifdef INSTALL_PREFIX #ifdef INSTALL_PREFIX
strcpy(sbuf2, INSTALL_PREFIX); strcpy(sbuf2, INSTALL_PREFIX);
//#else //#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment