diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2013-06-25 14:27:30 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2013-06-25 14:27:30 +0000 |
commit | e666fe5e38b28d1875791691232ba5e438d1dcbc (patch) | |
tree | ac7754922b8335edddea8cd345cbcd5b8355f5dd | |
parent | ff862e509f88a9ae96ab953fddfebe60cd3d8a0b (diff) |
Fixed deprecation warnings for many functions on OS X so they are tied
to the deployment version when building (<rdar://problem/14210079>)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11056 a1ca3aef-8c08-0410-bb20-df032aa958be
-rw-r--r-- | CHANGES.txt | 4 | ||||
-rw-r--r-- | cups/http.h | 6 | ||||
-rw-r--r-- | cups/ppd.h | 74 | ||||
-rw-r--r-- | cups/versioning.h | 16 |
4 files changed, 57 insertions, 43 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 105e1a9f7..db227a373 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,8 +1,10 @@ -CHANGES.txt - 1.7rc1 - 2013-06-12 +CHANGES.txt - 1.7rc1 - 2013-06-25 --------------------------------- CHANGES IN CUPS V1.7rc1 + - Fixed deprecation warnings for many functions on OS X so they are tied + to the deployment version when building (<rdar://problem/14210079>) - Fixed a build issue on ARM-based Linux systems - unable to validate va_list arguments. - Added a new ippfind tool for finding IPP printers and other Bonjour diff --git a/cups/http.h b/cups/http.h index 8373c7614..92953fc95 100644 --- a/cups/http.h +++ b/cups/http.h @@ -449,10 +449,10 @@ extern int httpCheck(http_t *http); extern void httpClearFields(http_t *http); extern void httpClose(http_t *http); extern http_t *httpConnect(const char *host, int port) - _CUPS_DEPRECATED_MSG("Use httpConnect2 instead."); + _CUPS_DEPRECATED_1_7_MSG("Use httpConnect2 instead."); extern http_t *httpConnectEncrypt(const char *host, int port, http_encryption_t encryption) - _CUPS_DEPRECATED_MSG("Use httpConnect2 instead."); + _CUPS_DEPRECATED_1_7_MSG("Use httpConnect2 instead."); extern int httpDelete(http_t *http, const char *uri); extern int httpEncryption(http_t *http, http_encryption_t e); extern int httpError(http_t *http); @@ -473,7 +473,7 @@ extern int httpPrintf(http_t *http, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int httpPut(http_t *http, const char *uri); extern int httpRead(http_t *http, char *buffer, int length) _CUPS_DEPRECATED_MSG("Use httpRead2 instead."); -extern int httpReconnect(http_t *http) _CUPS_DEPRECATED_MSG("Use httpReconnect2 instead."); +extern int httpReconnect(http_t *http) _CUPS_DEPRECATED_1_6_MSG("Use httpReconnect2 instead."); extern void httpSeparate(const char *uri, char *method, char *username, char *host, int *port, char *resource) _CUPS_DEPRECATED_MSG("Use httpSeparateURI instead."); diff --git a/cups/ppd.h b/cups/ppd.h index dae2560f5..56d2b0eae 100644 --- a/cups/ppd.h +++ b/cups/ppd.h @@ -7,7 +7,7 @@ * -D_PPD_DEPRECATED="" TO YOUR COMPILE OPTIONS. THIS HEADER AND THESE * FUNCTIONS WILL BE REMOVED IN A FUTURE RELEASE OF CUPS. * - * Copyright 2007-2012 by Apple Inc. + * Copyright 2007-2013 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -56,19 +56,7 @@ extern "C" { */ # ifndef _PPD_DEPRECATED -# if defined(__APPLE__) -# if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8 - /* Building for OS X 10.7 and earlier */ -# define _PPD_DEPRECATED -# elif !defined(MAC_OS_X_VERSION_10_8) - /* Building for OS X 10.7 and earlier */ -# define _PPD_DEPRECATED -# else -# define _PPD_DEPRECATED _CUPS_DEPRECATED -# endif /* MAC_OS_X_VERSION_10_8 && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8 */ -# else -# define _PPD_DEPRECATED _CUPS_DEPRECATED -# endif /* __APPLE__ */ +# define _PPD_DEPRECATED _CUPS_DEPRECATED_1_6_MSG("Use cupsCopyDestInfo and friends instead.") # endif /* !_PPD_DEPRECATED */ @@ -375,32 +363,39 @@ typedef struct ppd_file_s /**** PPD File ****/ */ extern int cupsMarkOptions(ppd_file_t *ppd, int num_options, - cups_option_t *options); -extern void ppdClose(ppd_file_t *ppd); + cups_option_t *options) _PPD_DEPRECATED; +extern void ppdClose(ppd_file_t *ppd) _PPD_DEPRECATED; extern int ppdCollect(ppd_file_t *ppd, ppd_section_t section, - ppd_choice_t ***choices); -extern int ppdConflicts(ppd_file_t *ppd); + ppd_choice_t ***choices) _PPD_DEPRECATED; +extern int ppdConflicts(ppd_file_t *ppd) _PPD_DEPRECATED; extern int ppdEmit(ppd_file_t *ppd, FILE *fp, - ppd_section_t section); + ppd_section_t section) _PPD_DEPRECATED; extern int ppdEmitFd(ppd_file_t *ppd, int fd, - ppd_section_t section); + ppd_section_t section) _PPD_DEPRECATED; extern int ppdEmitJCL(ppd_file_t *ppd, FILE *fp, int job_id, - const char *user, const char *title); -extern ppd_choice_t *ppdFindChoice(ppd_option_t *o, const char *option); + const char *user, const char *title) + _PPD_DEPRECATED; +extern ppd_choice_t *ppdFindChoice(ppd_option_t *o, const char *option) + _PPD_DEPRECATED; extern ppd_choice_t *ppdFindMarkedChoice(ppd_file_t *ppd, - const char *keyword); -extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword); + const char *keyword) + _PPD_DEPRECATED; +extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword) + _PPD_DEPRECATED; extern int ppdIsMarked(ppd_file_t *ppd, const char *keyword, - const char *option); -extern void ppdMarkDefaults(ppd_file_t *ppd); + const char *option) _PPD_DEPRECATED; +extern void ppdMarkDefaults(ppd_file_t *ppd) _PPD_DEPRECATED; extern int ppdMarkOption(ppd_file_t *ppd, const char *keyword, - const char *option); -extern ppd_file_t *ppdOpen(FILE *fp); -extern ppd_file_t *ppdOpenFd(int fd); -extern ppd_file_t *ppdOpenFile(const char *filename); -extern float ppdPageLength(ppd_file_t *ppd, const char *name); -extern ppd_size_t *ppdPageSize(ppd_file_t *ppd, const char *name); -extern float ppdPageWidth(ppd_file_t *ppd, const char *name); + const char *option) _PPD_DEPRECATED; +extern ppd_file_t *ppdOpen(FILE *fp) _PPD_DEPRECATED; +extern ppd_file_t *ppdOpenFd(int fd) _PPD_DEPRECATED; +extern ppd_file_t *ppdOpenFile(const char *filename) _PPD_DEPRECATED; +extern float ppdPageLength(ppd_file_t *ppd, const char *name) + _PPD_DEPRECATED; +extern ppd_size_t *ppdPageSize(ppd_file_t *ppd, const char *name) + _PPD_DEPRECATED; +extern float ppdPageWidth(ppd_file_t *ppd, const char *name) + _PPD_DEPRECATED; /**** New in CUPS 1.1.19 ****/ extern const char *ppdErrorString(ppd_status_t status) _PPD_DEPRECATED; @@ -420,14 +415,17 @@ extern int ppdCollect2(ppd_file_t *ppd, ppd_section_t section, extern int ppdEmitAfterOrder(ppd_file_t *ppd, FILE *fp, ppd_section_t section, int limit, float min_order) _PPD_DEPRECATED; -extern int ppdEmitJCLEnd(ppd_file_t *ppd, FILE *fp) _PPD_DEPRECATED; +extern int ppdEmitJCLEnd(ppd_file_t *ppd, FILE *fp) + _PPD_DEPRECATED; extern char *ppdEmitString(ppd_file_t *ppd, ppd_section_t section, float min_order) _PPD_DEPRECATED; extern ppd_coption_t *ppdFindCustomOption(ppd_file_t *ppd, - const char *keyword) _PPD_DEPRECATED; + const char *keyword) + _PPD_DEPRECATED; extern ppd_cparam_t *ppdFindCustomParam(ppd_coption_t *opt, const char *name) _PPD_DEPRECATED; -extern ppd_cparam_t *ppdFirstCustomParam(ppd_coption_t *opt) _PPD_DEPRECATED; +extern ppd_cparam_t *ppdFirstCustomParam(ppd_coption_t *opt) + _PPD_DEPRECATED; extern ppd_option_t *ppdFirstOption(ppd_file_t *ppd) _PPD_DEPRECATED; extern ppd_cparam_t *ppdNextCustomParam(ppd_coption_t *opt) _PPD_DEPRECATED; extern ppd_option_t *ppdNextOption(ppd_file_t *ppd) _PPD_DEPRECATED; @@ -445,7 +443,7 @@ extern const char *ppdLocalizeIPPReason(ppd_file_t *ppd, extern int cupsGetConflicts(ppd_file_t *ppd, const char *option, const char *choice, cups_option_t **options) - _PPD_DEPRECATED; + _PPD_DEPRECATED; extern int cupsResolveConflicts(ppd_file_t *ppd, const char *option, const char *choice, @@ -455,7 +453,7 @@ extern int cupsResolveConflicts(ppd_file_t *ppd, extern int ppdInstallableConflict(ppd_file_t *ppd, const char *option, const char *choice) - _PPD_DEPRECATED; + _PPD_DEPRECATED; extern ppd_attr_t *ppdLocalizeAttr(ppd_file_t *ppd, const char *keyword, const char *spec) _PPD_DEPRECATED; extern const char *ppdLocalizeMarkerName(ppd_file_t *ppd, diff --git a/cups/versioning.h b/cups/versioning.h index a9aab7246..6e9be4d15 100644 --- a/cups/versioning.h +++ b/cups/versioning.h @@ -106,14 +106,18 @@ */ # define _CUPS_DEPRECATED # define _CUPS_DEPRECATED_MSG(m) +# define _CUPS_DEPRECATED_1_6_MSG(m) +# define _CUPS_DEPRECATED_1_7_MSG(m) # define _CUPS_INTERNAL_MSG(m) # elif defined(_CUPS_HAS_UNAVAILABLE_WITH_MESSAGE) && defined(_CUPS_NO_DEPRECATED) /* - * Compiler supports the unsupported attribute, so use it when the code + * Compiler supports the unavailable attribute, so use it when the code * wants to exclude the use of deprecated API. */ # define _CUPS_DEPRECATED __attribute__ ((unavailable)) # define _CUPS_DEPRECATED_MSG(m) __attribute__ ((unavailable(m))) +# define _CUPS_DEPRECATED_1_6_MSG(m) __attribute__ ((unavailable(m))) +# define _CUPS_DEPRECATED_1_7_MSG(m) __attribute__ ((unavailable(m))) # define _CUPS_INTERNAL_MSG(m) __attribute__ ((unavailable(m))) # else /* @@ -125,6 +129,16 @@ # else # define _CUPS_DEPRECATED_MSG(m) __attribute__ ((deprecated)) # endif /* _CUPS_HAS_DEPRECATED_WITH_MESSAGE */ +# if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 +# define _CUPS_DEPRECATED_1_6_MSG(m) _CUPS_DEPRECATED_MSG(m) +# else +# define _CUPS_DEPRECATED_1_6_MSG(m) +# endif /* MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8 */ +# if defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 +# define _CUPS_DEPRECATED_1_7_MSG(m) _CUPS_DEPRECATED_MSG(m) +# else +# define _CUPS_DEPRECATED_1_7_MSG(m) +# endif /* MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_9 */ # ifdef _CUPS_SOURCE # define _CUPS_INTERNAL_MSG(m) # elif defined(_CUPS_HAS_UNAVAILABLE_WITH_MESSAGE) |