]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fixed deprecation warnings for many functions on OS X so they are tied
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 25 Jun 2013 14:27:30 +0000 (14:27 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 25 Jun 2013 14:27:30 +0000 (14:27 +0000)
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

CHANGES.txt
cups/http.h
cups/ppd.h
cups/versioning.h

index 105e1a9f76b6b791acf29ce62368bd8670077ca6..db227a3733a0fea7896c17aad0d597b8525934bd 100644 (file)
@@ -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
index 8373c761438a0b1e2b199fa084a3eb6a9f7e2792..92953fc954a4c60c78b76c4e70425f1347ef3dad 100644 (file)
@@ -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.");
index dae2560f55881077861a4ce1fc332498fc0b6c93..56d2b0eae94d22911c826d4cbd00b55aa8b880ed 100644 (file)
@@ -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,
index a9aab7246e441e8cafe9c64f162ba309537f914a..6e9be4d15eedff20671a3789df9d3e89f0deb231 100644 (file)
      */
 #    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
     /*
 #    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)