mirror of
				https://github.com/cookiengineer/audacity
				synced 2025-10-31 14:13:50 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| diff --git a/lib-src/libnyquist/nyquist/xlisp/security.c b/lib-src/libnyquist/nyquist/xlisp/security.c
 | |
| index 8a5c265..d971567 100644
 | |
| --- a/lib-src/libnyquist/nyquist/xlisp/security.c
 | |
| +++ b/lib-src/libnyquist/nyquist/xlisp/security.c
 | |
| @@ -4,7 +4,9 @@
 | |
|   */
 | |
|  
 | |
|  #include <stdlib.h>
 | |
| +#ifndef WIN32
 | |
|  #include <unistd.h>
 | |
| +#endif
 | |
|  #include <string.h>
 | |
|  #include <xlisp.h>
 | |
|  
 | |
| @@ -56,13 +58,13 @@ char *safe_write_path = NULL;
 | |
|  int ok_to_open(const char *filename, const char *mode)
 | |
|  {
 | |
|      char fullname[STRMAX];
 | |
| -    if (index(mode, 'r')) { /* asking for read permission */
 | |
| +    if (strchr(mode, 'r')) { /* asking for read permission */
 | |
|  	if (secure_read_path) { /* filename must be in path */
 | |
|  	    find_full_path(filename, fullname);
 | |
|  	    if (!in_tree(fullname, secure_read_path)) return FALSE;
 | |
|  	}
 | |
|      }
 | |
| -    if (index(mode, 'w')) { /* asking for write permission */
 | |
| +    if (strchr(mode, 'w')) { /* asking for write permission */
 | |
|  	if (safe_write_path) { /* filename must be in path */
 | |
|  	    find_full_path(filename, fullname);
 | |
|  	    if (!in_tree(fullname, safe_write_path)) return FALSE;
 | |
| @@ -98,7 +100,7 @@ void find_full_path(const char *filename, char *fullname)
 | |
|      /* if windows, replace \ with / to simplify the rest */
 | |
|      char *loc = fullname;
 | |
|      if (os_pathchar != '/') {
 | |
| -        while ((loc = index(loc, os_pathchar))) {
 | |
| +        while ((loc = strchr(loc, os_pathchar))) {
 | |
|  	    *loc = '/';
 | |
|  	}
 | |
|      }
 | |
| diff --git a/lib-src/libnyquist/nyquist/xlisp/xlisp.h b/lib-src/libnyquist/nyquist/xlisp/xlisp.h
 | |
| index 316f982..4e67e47 100644
 | |
| --- a/lib-src/libnyquist/nyquist/xlisp/xlisp.h
 | |
| +++ b/lib-src/libnyquist/nyquist/xlisp/xlisp.h
 | |
| @@ -40,6 +40,7 @@ HISTORY
 | |
|  #define OFFTYPE		long
 | |
|  #define SAVERESTORE
 | |
|  #define XL_LITTLE_ENDIAN 
 | |
| +#define _longjmp longjmp
 | |
|  #endif
 | |
|  
 | |
|  /* for the Turbo C compiler - MS-DOS, large model */
 |