mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* util.c (ruby_strtod): clear errno at the top of our own
impelementation of strtod(3). [ruby-dev:34834] [ruby-dev:34839] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									cf5cf236d7
								
							
						
					
					
						commit
						c2257734e3
					
				
					 3 changed files with 3 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -66,8 +66,8 @@ Sun May 25 02:37:25 2008  Koichi Sasada  <ko1@atdot.net>
 | 
			
		|||
 | 
			
		||||
Sat May 24 22:32:49 2008  Yukihiro Matsumoto  <matz@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* object.c (rb_cstr_to_dbl): should clear errno before calling
 | 
			
		||||
	  strtod(3).  [ruby-dev:34834]
 | 
			
		||||
	* util.c (ruby_strtod): clear errno at the top of our own
 | 
			
		||||
	  impelementation of strtod(3).  [ruby-dev:34834] [ruby-dev:34839]
 | 
			
		||||
 | 
			
		||||
Sat May 24 15:26:16 2008  Yusuke Endoh  <mame@tsg.ne.jp>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1
									
								
								object.c
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								object.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -2045,7 +2045,6 @@ rb_cstr_to_dbl(const char *p, int badcheck)
 | 
			
		|||
    if (!p) return 0.0;
 | 
			
		||||
    q = p;
 | 
			
		||||
    while (ISSPACE(*p)) p++;
 | 
			
		||||
    errno = 0;
 | 
			
		||||
    d = strtod(p, &end);
 | 
			
		||||
    if (errno == ERANGE) {
 | 
			
		||||
	OutOfRange();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								util.c
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								util.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1000,8 +1000,6 @@ static double private_mem[PRIVATE_mem], *pmem_next = private_mem;
 | 
			
		|||
#define IEEE_Arith
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "errno.h"
 | 
			
		||||
 | 
			
		||||
#ifdef Bad_float_h
 | 
			
		||||
 | 
			
		||||
#ifdef IEEE_Arith
 | 
			
		||||
| 
						 | 
				
			
			@ -2206,6 +2204,7 @@ ruby_strtod(const char *s00, char **se)
 | 
			
		|||
    const char *s2;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    errno = 0;
 | 
			
		||||
    sign = nz0 = nz = 0;
 | 
			
		||||
    dval(rv) = 0.;
 | 
			
		||||
    for (s = s00;;s++)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue