]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/versioning.h
Merge changes from CUPS 1.7svn-r10710.
[thirdparty/cups.git] / cups / versioning.h
index 6881ec79ddef38b63176b4befd5fb25b3f139dd2..f3fe9811483caa36338d4c2653c2e97e4a005b82 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   API versioning definitions for CUPS.
  *
- *   Copyright 2007-2011 by Apple Inc.
+ *   Copyright 2007-2012 by Apple Inc.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Apple Inc. and are protected by Federal copyright
 /*
  * This header defines several constants - _CUPS_DEPRECATED,
  * _CUPS_API_1_1, _CUPS_API_1_1_19, _CUPS_API_1_1_20, _CUPS_API_1_1_21,
- * _CUPS_API_1_2, _CUPS_API_1_3, _CUPS_API_1_4, _CUPS_API_1_5, _CUPS_API_1_6 -
- * which add compiler-specific attributes that flag functions that are
- * deprecated or added in particular releases.
+ * _CUPS_API_1_2, _CUPS_API_1_3, _CUPS_API_1_4, _CUPS_API_1_5, _CUPS_API_1_6,
+ * and _CUPS_API_1_7 - which add compiler-specific attributes that flag
+ * functions that are deprecated or added in particular releases.
  *
- * On Mac OS X, the _CUPS_API_* constants are defined based on the values of
+ * On OS X, the _CUPS_API_* constants are defined based on the values of
  * the MAC_OS_X_VERSION_MIN_ALLOWED and MAC_OS_X_VERSION_MAX_ALLOWED constants
  * provided by the compiler.
- *
- *
  */
 
 #  if defined(__APPLE__) && !defined(_CUPS_SOURCE)
@@ -51,6 +49,9 @@
 #    ifndef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
 #      define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER __attribute__((unavailable))
 #    endif /* !AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER */
+#    ifndef AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
+#      define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER __attribute__((unavailable))
+#    endif /* !AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER */
 #    define _CUPS_API_1_1_19 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
 #    define _CUPS_API_1_1_20 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
 #    define _CUPS_API_1_1_21 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
@@ -59,6 +60,7 @@
 #    define _CUPS_API_1_4 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
 #    define _CUPS_API_1_5 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
 #    define _CUPS_API_1_6 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
+#    define _CUPS_API_1_7 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER
 #  else
 #    define _CUPS_API_1_1_19
 #    define _CUPS_API_1_1_20
@@ -68,6 +70,7 @@
 #    define _CUPS_API_1_4
 #    define _CUPS_API_1_5
 #    define _CUPS_API_1_6
+#    define _CUPS_API_1_7
 #  endif /* __APPLE__ && !_CUPS_SOURCE */
 
 /*
  * a warning at compile-time.
  */
 
-#  if defined(__GNUC__) && __GNUC__ > 2 && !defined(_CUPS_SOURCE)
-#    define _CUPS_DEPRECATED __attribute__ ((__deprecated__))
+#  if defined(__GNUC__) && __GNUC__ > 2
+#    if defined(__clang__) && defined(_CUPS_NO_DEPRECATED)
+#      define _CUPS_DEPRECATED __attribute__ ((unavailable))
+#      define _CUPS_DEPRECATED_MSG(m) __attribute__ ((unavailable(m)))
+#    elif !defined(_CUPS_SOURCE) || defined(_CUPS_NO_DEPRECATED)
+#      define _CUPS_DEPRECATED __attribute__ ((deprecated))
+#      define _CUPS_DEPRECATED_MSG(m) __attribute__ ((deprecated(m)))
+#    else
+#      define _CUPS_DEPRECATED
+#      define _CUPS_DEPRECATED_MSG(m)
+#    endif /* !_CUPS_SOURCE || _CUPS_NO_DEPRECATED */
 #  else
 #    define _CUPS_DEPRECATED
-#  endif /* __GNUC__ && __GNUC__ > 2 && !_CUPS_SOURCE */
+#    define _CUPS_DEPRECATED_MSG(m)
+#  endif /* __GNUC__ && __GNUC__ > 2 */
 
 #  ifndef __GNUC__
 #    define __attribute__(x)
 #  endif /* !__GNUC__ */
 
+#
 #endif /* !_CUPS_VERSIONING_H_ */
 
 /*