]> git.ipfire.org Git - thirdparty/cups.git/blame - cups/versioning.h
Add missing files for test.
[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 *
6 * Copyright 2007 by Apple Inc.
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
25 * in particular releases. On Mac OS X, the _CUPS_API_* constants are
26 * defined based on the value of the MAC_OS_X_VERSION_MAX_ALLOWED constant
27 * provided by the compiler.
28 */
29
30# if defined(__APPLE__) && !defined(_CUPS_SOURCE)
31# if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3
32# define _CUPS_API_1_1_19 __attribute__((unavailable))
33# define _CUPS_API_1_1_20 __attribute__((unavailable))
34# define _CUPS_API_1_1_21 __attribute__((unavailable))
35# define _CUPS_API_1_2 __attribute__((unavailable))
36# define _CUPS_API_1_3 __attribute__((unavailable))
37# define _CUPS_API_1_4 __attribute__((unavailable))
38# elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4
39# define _CUPS_API_1_1_19
40# define _CUPS_API_1_1_20 __attribute__((unavailable))
41# define _CUPS_API_1_1_21 __attribute__((unavailable))
42# define _CUPS_API_1_2 __attribute__((unavailable))
43# define _CUPS_API_1_3 __attribute__((unavailable))
44# define _CUPS_API_1_4 __attribute__((unavailable))
45# elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
46# define _CUPS_API_1_1_19
47# define _CUPS_API_1_1_20
48# define _CUPS_API_1_1_21
49# define _CUPS_API_1_2 __attribute__((unavailable))
50# define _CUPS_API_1_3 __attribute__((unavailable))
51# define _CUPS_API_1_4 __attribute__((unavailable))
52# elif MAC_OS_X_VERSION_MAX_ALLOWED == MAC_OS_X_VERSION_10_5
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 __attribute__((unavailable))
59# else
60# define _CUPS_API_1_1_19
61# define _CUPS_API_1_1_20
62# define _CUPS_API_1_1_21
63# define _CUPS_API_1_2
64# define _CUPS_API_1_3
65# define _CUPS_API_1_4
66# endif /* MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_x */
67# else
68# define _CUPS_API_1_1_19
69# define _CUPS_API_1_1_20
70# define _CUPS_API_1_1_21
71# define _CUPS_API_1_2
72# define _CUPS_API_1_3
73# define _CUPS_API_1_4
5bd77a73 74# endif /* __APPLE__ && !_CUPS_SOURCE */
e94d2f10
MS
75
76/*
77 * With GCC 3.0 and higher, we can mark old APIs "deprecated" so you get
78 * a warning at compile-time.
79 */
80
81# if defined(__GNUC__) && __GNUC__ > 2
82# define _CUPS_DEPRECATED __attribute__ ((__deprecated__))
83# else
84# define _CUPS_DEPRECATED
85# endif /* __GNUC__ && __GNUC__ > 2 */
86
87#endif /* !_CUPS_VERSIONING_H_ */
88
89/*
90 * End of "$Id$".
91 */