Ticket #13058: 01-fix_leopard_deprecated_in_stdlib.2.patch
File 01-fix_leopard_deprecated_in_stdlib.2.patch, 1.2 KB (added by saispo@…, 17 years ago) |
---|
-
src/base.h
old new 1 1 #ifndef __BASE_H 2 2 #define __BASE_H 3 3 4 /* 4 5 #if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3 5 6 #define deprecated __attribute__((deprecated)) 6 7 #else 7 8 #define deprecated 8 9 #endif 10 */ 9 11 10 12 /*** Atomar Data Types ********************************************************/ 11 13 … … 184 186 val = (val + div / 2) / div; 185 187 } 186 188 } 187 189 188 190 return uname; 189 191 } 190 192 … … 193 195 /* 194 196 * Returns the lowest bit set in mask. 195 197 */ 196 template <class T> 198 template <class T> 197 199 inline unsigned lowbit(T mask) { 198 200 #if defined(CONFIG_X86_ASM) && defined(__i386__) && \ 199 201 defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ > 208) 200 202 unsigned bit; 201 203 asm ("bsf %1,%0" : "=r" (bit) : "r" (mask)); 202 204 #else 203 unsigned bit(0); 205 unsigned bit(0); 204 206 while(!(mask & (1 << bit)) && bit < sizeof(mask) * 8) ++bit; 205 207 #endif 206 208 … … 210 212 /* 211 213 * Returns the highest bit set in mask. 212 214 */ 213 template <class T> 215 template <class T> 214 216 inline unsigned highbit(T mask) { 215 217 #if defined(CONFIG_X86_ASM) && defined(__i386__) && \ 216 218 defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ > 208)