]> git.ipfire.org Git - thirdparty/cups.git/blame - cups/versioning.h
Make sure EOL is right on import file.
[thirdparty/cups.git] / cups / versioning.h
CommitLineData
e94d2f10
MS
1/*
2 * "$Id$"
3 *
4 * API versioning definitions for the Common UNIX Printing System (CUPS).
5 *
749b1e90 6 * Copyright 2007-2008 by Apple Inc.
e94d2f10
MS
7 *
8 * These coded instructions, statements, and computer programs are the
9 * property of Apple Inc. and are protected by Federal copyright
10 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
11 * which should have been included with this file. If this file is
12 * file is missing or damaged, see the license at "http://www.cups.org/".
13 *
14 * This file is subject to the Apple OS-Developed Software exception.
15 */
16
17#ifndef _CUPS_VERSIONING_H_
18# define _CUPS_VERSIONING_H_
19
20/*
21 * This header defines several constants - _CUPS_DEPRECATED,
22 * _CUPS_API_1_1, _CUPS_API_1_1_19, _CUPS_API_1_1_20, _CUPS_API_1_1_21,
23 * _CUPS_API_1_2, _CUPS_API_1_3, _CUPS_API_1_4 - which add compiler-
24 * specific attributes that flag functions that are deprecated or added
749b1e90
MS
25 * in particular releases.
26 *
27 * On Mac OS X, the _CUPS_API_* constants are defined based on the values of
28 * the MAC_OS_X_VERSION_MIN_ALLOWED and MAC_OS_X_VERSION_MAX_ALLOWED constants
e94d2f10
MS
29 * provided by the compiler.
30 */
31
32# if defined(__APPLE__) && !defined(_CUPS_SOURCE)
749b1e90
MS
33# include <AvailabilityMacros.h>
34# ifndef AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
35# define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER __attribute__((unavailable))
36# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER */
37# ifndef AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
38# define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER __attribute__((unavailable))
39# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER */
40# ifndef AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
41# define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER __attribute__((unavailable))
42# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER */
43# ifndef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
44# define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER __attribute__((unavailable))
45# endif /* !AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER */
46# define _CUPS_API_1_1_19 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
47# define _CUPS_API_1_1_20 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
48# define _CUPS_API_1_1_21 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER
49# define _CUPS_API_1_2 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
50# define _CUPS_API_1_3 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
51# define _CUPS_API_1_4 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
e94d2f10
MS
52# else
53# define _CUPS_API_1_1_19
54# define _CUPS_API_1_1_20
55# define _CUPS_API_1_1_21
56# define _CUPS_API_1_2
57# define _CUPS_API_1_3
58# define _CUPS_API_1_4
5bd77a73 59# endif /* __APPLE__ && !_CUPS_SOURCE */
e94d2f10
MS
60
61/*
62 * With GCC 3.0 and higher, we can mark old APIs "deprecated" so you get
63 * a warning at compile-time.
64 */
65
66# if defined(__GNUC__) && __GNUC__ > 2
67# define _CUPS_DEPRECATED __attribute__ ((__deprecated__))
68# else
69# define _CUPS_DEPRECATED
70# endif /* __GNUC__ && __GNUC__ > 2 */
71
72#endif /* !_CUPS_VERSIONING_H_ */
73
74/*
75 * End of "$Id$".
76 */