mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* dln.h (dln_find_exe, dln_find_file): deprecated, use reentrant
versions instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									92c2f654db
								
							
						
					
					
						commit
						c30616378e
					
				
					 4 changed files with 11 additions and 5 deletions
				
			
		|  | @ -1,3 +1,8 @@ | |||
| Sun Jul 27 09:15:28 2008  Nobuyoshi Nakada  <nobu@ruby-lang.org> | ||||
| 
 | ||||
| 	* dln.h (dln_find_exe, dln_find_file): deprecated, use reentrant | ||||
| 	  versions instead. | ||||
| 
 | ||||
| Sun Jul 27 09:02:32 2008  Masatoshi SEKI  <m_seki@mva.biglobe.ne.jp> | ||||
| 
 | ||||
| 	* lib/rinda/tuplespace.rb: merged from 1.8. | ||||
|  |  | |||
							
								
								
									
										4
									
								
								dln.c
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								dln.c
									
										
									
									
									
								
							|  | @ -348,14 +348,14 @@ sym_hash(struct exec *hdrp, struct nlist *syms) | |||
| static int | ||||
| dln_init(const char *prog) | ||||
| { | ||||
|     char *file; | ||||
|     char *file, fbuf[MAXPATHLEN]; | ||||
|     int fd; | ||||
|     struct exec hdr; | ||||
|     struct nlist *syms; | ||||
| 
 | ||||
|     if (dln_init_p == 1) return 0; | ||||
| 
 | ||||
|     file = dln_find_exe(prog, NULL); | ||||
|     file = dln_find_exe_r(prog, NULL, fbuf, sizeof(fbuf)); | ||||
|     if (file == NULL || (fd = open(file, O_RDONLY)) < 0) { | ||||
| 	dln_errno = errno; | ||||
| 	return -1; | ||||
|  |  | |||
							
								
								
									
										4
									
								
								dln.h
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								dln.h
									
										
									
									
									
								
							|  | @ -28,8 +28,8 @@ | |||
| # define _(args) () | ||||
| #endif | ||||
| 
 | ||||
| char *dln_find_exe(const char*,const char*); | ||||
| char *dln_find_file(const char*,const char*); | ||||
| DEPRECATED(char *dln_find_exe(const char*,const char*)); | ||||
| DEPRECATED(char *dln_find_file(const char*,const char*)); | ||||
| char *dln_find_exe_r(const char*,const char*,char*,int); | ||||
| char *dln_find_file_r(const char*,const char*,char*,int); | ||||
| 
 | ||||
|  |  | |||
|  | @ -928,6 +928,7 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa, | |||
|     const char *shell; | ||||
|     struct ChildRecord *child; | ||||
|     char *p = NULL; | ||||
|     char fbuf[MAXPATHLEN]; | ||||
| 
 | ||||
|     if (!cmd && !prog) { | ||||
| 	errno = EFAULT; | ||||
|  | @ -975,7 +976,7 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa, | |||
|     dwCreationFlags = (NORMAL_PRIORITY_CLASS); | ||||
| 
 | ||||
|     if (prog) { | ||||
| 	if (!(p = dln_find_exe(prog, NULL))) { | ||||
| 	if (!(p = dln_find_exe_r(prog, NULL, fbuf, sizeof(fbuf)))) { | ||||
| 	    shell = prog; | ||||
| 	} | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nobu
						nobu