types.h: gcc before 4.5 has a no-argument form of deprecated.
device.h: use LIBCIO_DEPRECATED macro rather than assume gcc.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/* -*- c -*-
|
/* -*- c -*-
|
||||||
|
|
||||||
Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011 Rocky Bernstein
|
Copyright (C) 2005, 2006, 2008, 2009, 2010, 2011, 2012 Rocky Bernstein
|
||||||
<rocky@gnu.org>
|
<rocky@gnu.org>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
@@ -200,10 +200,10 @@ extern "C" {
|
|||||||
enumeration in driver_id_t. Since we have a bogus (but useful) 0th
|
enumeration in driver_id_t. Since we have a bogus (but useful) 0th
|
||||||
entry above we don't have to add one.
|
entry above we don't have to add one.
|
||||||
*/
|
*/
|
||||||
static const driver_id_t CDIO_MIN_DRIVER __attribute__ ((deprecated("please use cdio_drivers"))) = DRIVER_AIX;
|
LIBCDIO_DEPRECATED(static const driver_id_t CDIO_MIN_DRIVER, "please use cdio_drivers") = DRIVER_AIX;
|
||||||
static const driver_id_t CDIO_MIN_DEVICE_DRIVER __attribute__ ((deprecated("please use cdio_device_drivers"))) = DRIVER_AIX;
|
LIBCDIO_DEPRECATED(static const driver_id_t CDIO_MIN_DEVICE_DRIVER, "please use cdio_device_drivers") = DRIVER_AIX;
|
||||||
static const driver_id_t CDIO_MAX_DRIVER __attribute__ ((deprecated("please use cdio_drivers"))) = DRIVER_NRG;
|
LIBCDIO_DEPRECATED(static const driver_id_t CDIO_MAX_DRIVER, "please use cdio_drivers") = DRIVER_NRG;
|
||||||
static const driver_id_t CDIO_MAX_DEVICE_DRIVER __attribute__ ((deprecated("please use cdio_device_drivers"))) = DRIVER_WIN32;
|
LIBCDIO_DEPRECATED(static const driver_id_t CDIO_MAX_DEVICE_DRIVER, "please use cdio_device_drivers") = DRIVER_WIN32;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The following are status codes for completion of a given cdio
|
The following are status codes for completion of a given cdio
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008
|
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2012
|
||||||
Rocky Bernstein <rocky@gnu.org>
|
Rocky Bernstein <rocky@gnu.org>
|
||||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||||
|
|
||||||
@@ -158,8 +158,8 @@ typedef uint8_t ubyte;
|
|||||||
# define PRAGMA_END_PACKED
|
# define PRAGMA_END_PACKED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* user directed static branch prediction gcc 2.96+
|
* user-directed static branch prediction gcc 2.96+
|
||||||
*/
|
*/
|
||||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
|
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
|
||||||
# define GNUC_LIKELY(x) __builtin_expect((x),true)
|
# define GNUC_LIKELY(x) __builtin_expect((x),true)
|
||||||
@@ -173,7 +173,21 @@ typedef uint8_t ubyte;
|
|||||||
# define NULL ((void*) 0)
|
# define NULL ((void*) 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* our own offsetof()-like macro */
|
/** Provide a notice for deprecated elements. Before gcc 4.5 'deprecated'
|
||||||
|
takes no arguments. */
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5)
|
||||||
|
# define LIBCDIO_DEPRECATED(object, notice) object __attribute__ ((deprecated(notice)))
|
||||||
|
# else
|
||||||
|
# define LIBCDIO_DEPRECATED(object, notice) object __attribute__ ((deprecated))
|
||||||
|
# endif
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#define LIBCDIO_DEPRECATED(object, notice) __declspec(deprecated(notice)) object
|
||||||
|
#else
|
||||||
|
#define LIBCDIO_DEPRECATED(object, notice)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** our own offsetof()-like macro */
|
||||||
#define __cd_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
|
#define __cd_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
Reference in New Issue
Block a user