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