Codebase list libvirt-glib / upstream/0.1.9 libvirt-gconfig / libvirt-gconfig-compat.h
upstream/0.1.9

Tree @upstream/0.1.9 (Download .tar.gz)

libvirt-gconfig-compat.h @upstream/0.1.9raw · history · blame

/*
 * libvirt-gconfig-compat.h: libvirt configuration
 *
 * Copyright (C) 2012 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see
 * <http://www.gnu.org/licenses/>.
 *
 * Author: Christophe Fergeau <cfergeau@redhat.com>
 */

#ifndef __LIBVIRT_GCONFIG_COMPAT_H__
#define __LIBVIRT_GCONFIG_COMPAT_H__

#include <glib-object.h>

#if !GLIB_CHECK_VERSION(2,32,0)

#if    __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
#define G_DEPRECATED __attribute__((__deprecated__))
#elif defined(_MSC_VER) && (_MSC_VER >= 1300)
#define G_DEPRECATED __declspec(deprecated)
#else
#define G_DEPRECATED
#endif

#if    __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
#define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead")))
#elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320)
#define G_DEPRECATED_FOR(f) __declspec(deprecated("is deprecated. Use '" #f "' instead"))
#else
#define G_DEPRECATED_FOR(f) G_DEPRECATED
#endif

#endif

#if GLIB_CHECK_VERSION(2, 35, 0)
#define g_type_init()
#endif

#endif /* __LIBVIRT_GCONFIG_COMPAT_H__ */