mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	Moved getcwd() hack to its own file.
This commit is contained in:
		
							parent
							
								
									de9775af8f
								
							
						
					
					
						commit
						c83fd37341
					
				
					 1 changed files with 0 additions and 21 deletions
				
			
		| 
						 | 
					@ -319,27 +319,6 @@ posix_utimes(self, args)
 | 
				
			||||||
	return None;
 | 
						return None;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef NO_GETCWD
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "errno.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Quick hack to get posix.getcwd() working for pure BSD 4.3 */
 | 
					 | 
				
			||||||
/* XXX This assumes MAXPATHLEN = 1024 !!! */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static char *
 | 
					 | 
				
			||||||
getcwd(buf, size)
 | 
					 | 
				
			||||||
	char *buf;
 | 
					 | 
				
			||||||
	int size;
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	extern char *getwd PROTO((char *));
 | 
					 | 
				
			||||||
	register char *ret = getwd(buf);
 | 
					 | 
				
			||||||
	if (ret == NULL)
 | 
					 | 
				
			||||||
		errno = EACCES; /* Most likely error */
 | 
					 | 
				
			||||||
	return ret;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif /* NO_GETCWD */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef NO_LSTAT
 | 
					#ifndef NO_LSTAT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue