Changeset 6397

Show
Ignore:
Timestamp:
07/02/08 22:11:16 (2 months ago)
Author:
flynd
Message:

Use a define to mark deprecated functions as the attribute is not supported by all compilers. Conditions for define was taken from Qt 4.4.0 headers.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/include/licq_user.h

    r6382 r6397  
    1717// Added for plugin convenience 
    1818#include "licq_constants.h" 
     19 
     20// Define for marking functions as deprecated 
     21#ifndef LICQ_DEPRECATED 
     22# if defined(__GNUC__) && !defined(__INTEL_COMPILER) && (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2)) 
     23#  define LICQ_DEPRECATED __attribute__ ((__deprecated__)) 
     24# elif defined(_MSC_VER) && (_MSC_VER >= 1300) 
     25#  define LICQ_DEPRECATED __declspec(deprecated) 
     26# else 
     27#  define LICQ_DEPRECATED 
     28# endif 
     29#endif 
    1930 
    2031class TCPSocket; 
     
    12881299 
    12891300  // Deprecated owner functions, to be removed 
    1290   void SetOwnerUin(unsigned long _nUin) __attribute__ ((deprecated)); 
    1291   unsigned long OwnerUin() __attribute__ ((deprecated)) { return icqOwnerUin(); } 
    1292   ICQOwner *FetchOwner(unsigned short) __attribute__ ((deprecated)); 
    1293   void DropOwner() __attribute__ ((deprecated)); 
    1294   void DropOwner(unsigned long) __attribute__ ((deprecated)); 
     1301  void SetOwnerUin(unsigned long _nUin) LICQ_DEPRECATED; 
     1302  unsigned long OwnerUin() LICQ_DEPRECATED { return icqOwnerUin(); } 
     1303  ICQOwner *FetchOwner(unsigned short) LICQ_DEPRECATED; 
     1304  void DropOwner() LICQ_DEPRECATED; 
     1305  void DropOwner(unsigned long) LICQ_DEPRECATED; 
    12951306 
    12961307  /**