mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* hash.c, eval.c: Use (*_NSGetEnviron()) instead of environ on
Darwin for namespace cleanness. [ruby-core:00537] * dln.c (dln_load): Fix Darwin support that has been disabled and switch to using it on Darwin instead of the system dlopen(). [ruby-core:00541] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									9dce0d8f0b
								
							
						
					
					
						commit
						6dfb5aa6ac
					
				
					 4 changed files with 28 additions and 7 deletions
				
			
		|  | @ -1,3 +1,12 @@ | |||
| Fri Oct 18 01:02:44 2002  Akinori MUSHA  <knu@iDaemons.org> | ||||
| 
 | ||||
| 	* hash.c, eval.c: Use (*_NSGetEnviron()) instead of environ on | ||||
| 	  Darwin for namespace cleanness.  [ruby-core:00537] | ||||
| 
 | ||||
| 	* dln.c (dln_load): Fix Darwin support that has been disabled and | ||||
| 	  switch to using it on Darwin instead of the system dlopen(). | ||||
| 	  [ruby-core:00541] | ||||
| 
 | ||||
| Thu Oct 17 19:17:56 2002  Nobuyoshi Nakada  <nobu.nokada@softhome.net> | ||||
| 
 | ||||
| 	* marshal.c (w_byten): added; write n bytes from s to arg. | ||||
|  |  | |||
							
								
								
									
										9
									
								
								dln.c
									
										
									
									
									
								
							
							
						
						
									
										9
									
								
								dln.c
									
										
									
									
									
								
							|  | @ -90,7 +90,7 @@ char *getenv(); | |||
| 
 | ||||
| int eaccess(); | ||||
| 
 | ||||
| #if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) | ||||
| #if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) | ||||
| /* dynamic load with dlopen() */ | ||||
| # define USE_DLN_DLOPEN | ||||
| #endif | ||||
|  | @ -1429,12 +1429,9 @@ dln_load(file) | |||
| 	NSLinkModule(obj_file, file, NSLINKMODULE_OPTION_BINDNOW); | ||||
| 
 | ||||
| 	/* lookup the initial function */ | ||||
| 	/*NSIsSymbolNameDefined require function name without "_" */ | ||||
| 	if(NSIsSymbolNameDefined(buf + 1)) { | ||||
| 	if(!NSIsSymbolNameDefined(buf)) { | ||||
| 	    rb_loaderror("Failed to lookup Init function %.200s",file); | ||||
| 	} | ||||
| 
 | ||||
| 	/* NSLookupAndBindSymbol require function name with "_" !! */ | ||||
| 	}	 | ||||
| 	init_fct = NSAddressOfSymbol(NSLookupAndBindSymbol(buf)); | ||||
| 	(*init_fct)(); | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										8
									
								
								eval.c
									
										
									
									
									
								
							
							
						
						
									
										8
									
								
								eval.c
									
										
									
									
									
								
							|  | @ -23,6 +23,10 @@ | |||
| #include "st.h" | ||||
| #include "dln.h" | ||||
| 
 | ||||
| #ifdef __APPLE__ | ||||
| #include <crt_externs.h> | ||||
| #endif | ||||
| 
 | ||||
| /* Make alloca work the best possible way.  */ | ||||
| #ifdef __GNUC__ | ||||
| # ifndef atarist | ||||
|  | @ -1040,7 +1044,9 @@ error_print() | |||
|     } | ||||
| } | ||||
| 
 | ||||
| #if !defined(NT) && !defined(__MACOS__) | ||||
| #if defined(__APPLE__) | ||||
| #define environ (*_NSGetEnviron()) | ||||
| #elif !defined(NT) && !defined(__MACOS__) | ||||
| extern char **environ; | ||||
| #endif | ||||
| char **rb_origenviron; | ||||
|  |  | |||
							
								
								
									
										9
									
								
								hash.c
									
										
									
									
									
								
							
							
						
						
									
										9
									
								
								hash.c
									
										
									
									
									
								
							|  | @ -17,6 +17,10 @@ | |||
| #include "util.h" | ||||
| #include "rubysig.h" | ||||
| 
 | ||||
| #ifdef __APPLE__ | ||||
| #include <crt_externs.h> | ||||
| #endif | ||||
| 
 | ||||
| #define HASH_DELETED  FL_USER1 | ||||
| #define HASH_PROC_DEFAULT FL_USER2 | ||||
| 
 | ||||
|  | @ -944,6 +948,11 @@ static char **origenviron; | |||
| static char **my_environ; | ||||
| #undef environ | ||||
| #define environ my_environ | ||||
| #elif defined(__APPLE__) | ||||
| #undef environ | ||||
| #define environ (*_NSGetEnviron()) | ||||
| #define GET_ENVIRON(e) (e) | ||||
| #define FREE_ENVIRON(e) | ||||
| #else | ||||
| extern char **environ; | ||||
| #define GET_ENVIRON(e) (e) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 knu
						knu