# include/xapian/deprecated.h

    00001 // deprecated.h: Define XAPIAN_DEPRECATED() macro.
    00002 //
    00003 // Copyright (C) 2006,2007 Olly Betts
    00004 //
    00005 // This program is free software; you can redistribute it and/or modify
    00006 // it under the terms of the GNU General Public License as published by
    00007 // the Free Software Foundation; either version 2 of the License, or
    00008 // (at your option) any later version.
    00009 //
    00010 // This program is distributed in the hope that it will be useful,
    00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00013 // GNU General Public License for more details.
    00014 //
    00015 // You should have received a copy of the GNU General Public License
    00016 // along with this program; if not, write to the Free Software
    00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
    00018
    00019 #ifndef XAPIAN_INCLUDED_DEPRECATED_H
    00020 #define XAPIAN_INCLUDED_DEPRECATED_H
    00021
    00022 // How to use of the XAPIAN_DEPRECATED is document in HACKING - see the
    00023 // section "Marking Features as Deprecated".  Don't forget to update the
    00024 // documentation of deprecated methods for end users in docs/deprecation.rst
    00025 // too!
    00026
    00027 // xapian-bindings needs to wrap deprecated functions without warnings,
    00028 // so check if XAPIAN_DEPRECATED is defined so xapian-bindings can override
    00029 // it.
    00030 #ifndef XAPIAN_DEPRECATED
    00031 # if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0))
    00032 // __attribute__((__deprecated__)) is supported by GCC 3.1 and later.
    00033 #  define XAPIAN_DEPRECATED(D) D __attribute__((__deprecated__))
    00034 # elif defined _MSC_VER && _MSC_VER >= 1300
    00035 // __declspec(deprecated) is supported by MSVC 7.0 and later.
    00036 #  define XAPIAN_DEPRECATED(D) __declspec(deprecated) D
    00037 # else
    00038 #  define XAPIAN_DEPRECATED(D) D
    00039 # endif
    00040 #endif
    00041
    00042 #endif