00001 // deprecated.h: Define XAPIAN_DEPRECATED() macro. 00002 // 00003 // Copyright (C) 2006 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 // xapian-bindings needs to wrap deprecated functions without warnings, 00023 // so check if XAPIAN_DEPRECATED is defined so xapian-bindings can override 00024 // it. 00025 #ifndef XAPIAN_DEPRECATED 00026 # if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)) 00027 // __attribute__((deprecated)) is supported by GCC 3.1 and later. 00028 # define XAPIAN_DEPRECATED(D) D __attribute__((deprecated)) 00029 # elif defined _MSC_VER && _MSC_VER >= 1300 00030 // __declspec(deprecated) is supported by MSVC 7.0 and later. 00031 # define XAPIAN_DEPRECATED(D) __declspec(deprecated) D 00032 # else 00033 # define XAPIAN_DEPRECATED(D) D 00034 # endif 00035 #endif 00036 00037 #endif