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)

Patch for IceWM

  • src/base.h

    old new  
    11#ifndef __BASE_H
    22#define __BASE_H
    33
     4/*
    45#if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3
    56#define deprecated __attribute__((deprecated))
    67#else
    78#define deprecated
    89#endif
     10*/
    911
    1012/*** Atomar Data Types ********************************************************/
    1113
     
    184186            val = (val + div / 2) / div;
    185187        }
    186188    }
    187    
     189
    188190    return uname;
    189191}
    190192
     
    193195/*
    194196 * Returns the lowest bit set in mask.
    195197 */
    196 template <class T> 
     198template <class T>
    197199inline unsigned lowbit(T mask) {
    198200#if defined(CONFIG_X86_ASM) && defined(__i386__) && \
    199201    defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ > 208)
    200202    unsigned bit;
    201203    asm ("bsf %1,%0" : "=r" (bit) : "r" (mask));
    202204#else
    203     unsigned bit(0); 
     205    unsigned bit(0);
    204206    while(!(mask & (1 << bit)) && bit < sizeof(mask) * 8) ++bit;
    205207#endif
    206208
     
    210212/*
    211213 * Returns the highest bit set in mask.
    212214 */
    213 template <class T> 
     215template <class T>
    214216inline unsigned highbit(T mask) {
    215217#if defined(CONFIG_X86_ASM) && defined(__i386__) && \
    216218    defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ > 208)