]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Get rid of some obsolete defines: HAVE_CRYPT_H, HAVE_DNSSD, HAVE_SHADOW_H, and
authorMichael R Sweet <msweet@msweet.org>
Mon, 18 Sep 2023 14:58:45 +0000 (10:58 -0400)
committerMichael R Sweet <msweet@msweet.org>
Mon, 18 Sep 2023 14:58:45 +0000 (10:58 -0400)
HAVE_RRESVPORT_AF.

18 files changed:
backend/dnssd.c
config-scripts/cups-common.m4
config-scripts/cups-dnssd.m4
config-scripts/cups-network.m4
config.h.in
configure
scheduler/auth.c
scheduler/client.c
scheduler/conf.c
scheduler/dirsvc.c
scheduler/dirsvc.h
scheduler/ipp.c
scheduler/main.c
scheduler/printers.c
scheduler/printers.h
scheduler/sysman.c
vcnet/config.h
xcode/config.h

index fb978abcf3f5de87418866e79686d27ee1ec33dd..ba9882675756b2b887d5c66457185d77a024d0e8 100644 (file)
@@ -942,8 +942,7 @@ poll_callback(
 #endif /* HAVE_AVAHI */
 
 
-#ifdef HAVE_DNSSD
-#  ifdef HAVE_MDNSRESPONDER
+#ifdef HAVE_MDNSRESPONDER
 /*
  * 'query_callback()' - Process query data.
  */
@@ -1234,7 +1233,6 @@ query_callback(
   else
     device->make_and_model = strdup(model);
 }
-#endif /* HAVE_DNSSD */
 
 
 /*
index 12fa7de263f2d7c14804bba60635321a679ac102..d2a038fc049847d57679d6bc120dfa538e78ee70 100644 (file)
@@ -126,10 +126,8 @@ AS_IF([test x$enable_libpaper = xyes], [
 AC_SUBST([LIBPAPER])
 
 dnl Checks for header files.
-AC_CHECK_HEADER([crypt.h], AC_DEFINE([HAVE_CRYPT_H], [1], [Have <crypt.h> header?]))
 AC_CHECK_HEADER([langinfo.h], AC_DEFINE([HAVE_LANGINFO_H], [1], [Have <langinfo.h> header?]))
 AC_CHECK_HEADER([malloc.h], AC_DEFINE([HAVE_MALLOC_H], [1], [Have <malloc.h> header?]))
-AC_CHECK_HEADER([shadow.h], AC_DEFINE([HAVE_SHADOW_H], [1], [Have <shadow.h> header?]))
 AC_CHECK_HEADER([stdint.h], AC_DEFINE([HAVE_STDINT_H], [1], [Have <stdint.h> header?]))
 AC_CHECK_HEADER([sys/ioctl.h], AC_DEFINE([HAVE_SYS_IOCTL_H], [1], [Have <sys/ioctl.h> header?]))
 AC_CHECK_HEADER([sys/param.h], AC_DEFINE([HAVE_SYS_PARAM_H], [1], [Have <sys/param.h> header?]))
index 0ae7225375409fadc76eff69f029d128a4a8c4bd..f27c6fea22910f7bc82a397cd1be1dce3eebe9ac 100644 (file)
@@ -34,7 +34,6 @@ AS_IF([test $with_dnssd = yes -o $with_dnssd = mdnsresponder], [
        AS_CASE(["$host_os_name"], [darwin*], [
            # Darwin and macOS...
            with_dnssd="mdnsresponder"
-           AC_DEFINE([HAVE_DNSSD], [1], [Have DNS-SD support?])
            AC_DEFINE([HAVE_MDNSRESPONDER], [1], [Have mDNSResponder library?])
            DNSSD_BACKEND="dnssd"
            IPPFIND_BIN="ippfind"
@@ -54,7 +53,6 @@ AS_IF([test $with_dnssd = yes -o $with_dnssd = mdnsresponder], [
            ], [
                AC_MSG_RESULT([yes])
                with_dnssd="mdnsresponder"
-               AC_DEFINE([HAVE_DNSSD], [1], [Have DNS-SD support?])
                AC_DEFINE([HAVE_MDNSRESPONDER], [1], [Have mDNSResponder library?])
                DNSSDLIBS="-ldns_sd"
                DNSSD_BACKEND="dnssd"
@@ -89,7 +87,6 @@ AS_IF([test $with_dnssd = avahi -o $with_dnssd = yes], [
            IPPFIND_MAN="ippfind.1"
                PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES avahi-client"
            AC_DEFINE([HAVE_AVAHI], [1], [Have Avahi client library?])
-           AC_DEFINE([HAVE_DNSSD], [1], [Have DNS-SD support?])
        ], [
            AC_MSG_RESULT([no])
            AS_IF([test $with_dnssd = avahi], [
index 695d0ae102d79040ce1793b41d7f4caed593b68e..b694643ed7975b3a31fad9c9813a0aae365181ed 100644 (file)
@@ -27,9 +27,6 @@ AC_SEARCH_LIBS([getifaddrs], [nsl], [
 AC_SEARCH_LIBS([hstrerror], [nsl socket resolv], [
     AC_DEFINE([HAVE_HSTRERROR], [1], [Have the hstrerror function?])
 ])
-AC_SEARCH_LIBS([rresvport_af], [nsl], [
-    AC_DEFINE([HAVE_RRESVPORT_AF], [1], [Have the rresvport_af function?])
-])
 AC_SEARCH_LIBS([__res_init], [resolv bind], [
     AC_DEFINE([HAVE_RES_INIT], [1], [Have res_init function?])
 ], [
index 487193177f584f3cb87c1c2b8a4e0b2db58976b2..5a0e05b7a515013d00d3991fadcf08df62c14bc6 100644 (file)
 #undef HAVE_PAM_SETCRED
 
 
-/*
- * Do we have <shadow.h>?
- */
-
-#undef HAVE_SHADOW_H
-
-
-/*
- * Do we have <crypt.h>?
- */
-
-#undef HAVE_CRYPT_H
-
-
 /*
  * Use <stdint.h>?
  */
 #undef HAVE_LIBPAPER
 
 
-/*
- * Do we have DNS Service Discovery (aka Bonjour) support?
- */
-
-#undef HAVE_DNSSD
-
-
 /*
  * Do we have mDNSResponder for DNS-SD?
  */
 #undef HAVE_TM_GMTOFF
 
 
-/*
- * Do we have rresvport_af()?
- */
-
-#undef HAVE_RRESVPORT_AF
-
-
 /*
  * Do we have getifaddrs()?
  */
index f07723300cc104fe2659378ebe1c6d8732b8242b..4560943f7cc807a9c9386a5fefd003cfa3d01747 100755 (executable)
--- a/configure
+++ b/configure
@@ -6001,14 +6001,6 @@ then :
 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
 
 fi
-ac_fn_c_check_header_compile "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
-if test "x$ac_cv_header_crypt_h" = xyes
-then :
-
-printf "%s\n" "#define HAVE_CRYPT_H 1" >>confdefs.h
-
-fi
-
 ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
 if test "x$ac_cv_header_langinfo_h" = xyes
 then :
@@ -6025,14 +6017,6 @@ printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h
 
 fi
 
-ac_fn_c_check_header_compile "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
-if test "x$ac_cv_header_shadow_h" = xyes
-then :
-
-printf "%s\n" "#define HAVE_SHADOW_H 1" >>confdefs.h
-
-fi
-
 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
 if test "x$ac_cv_header_stdint_h" = xyes
 then :
@@ -8578,69 +8562,6 @@ then :
 printf "%s\n" "#define HAVE_HSTRERROR 1" >>confdefs.h
 
 
-fi
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing rresvport_af" >&5
-printf %s "checking for library containing rresvport_af... " >&6; }
-if test ${ac_cv_search_rresvport_af+y}
-then :
-  printf %s "(cached) " >&6
-else $as_nop
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-char rresvport_af ();
-int
-main (void)
-{
-return rresvport_af ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' nsl
-do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_search_rresvport_af=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
-    conftest$ac_exeext
-  if test ${ac_cv_search_rresvport_af+y}
-then :
-  break
-fi
-done
-if test ${ac_cv_search_rresvport_af+y}
-then :
-
-else $as_nop
-  ac_cv_search_rresvport_af=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rresvport_af" >&5
-printf "%s\n" "$ac_cv_search_rresvport_af" >&6; }
-ac_res=$ac_cv_search_rresvport_af
-if test "$ac_res" != no
-then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-
-printf "%s\n" "#define HAVE_RRESVPORT_AF 1" >>confdefs.h
-
-
 fi
 
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing __res_init" >&5
@@ -10488,9 +10409,6 @@ then :
            # Darwin and macOS...
            with_dnssd="mdnsresponder"
 
-printf "%s\n" "#define HAVE_DNSSD 1" >>confdefs.h
-
-
 printf "%s\n" "#define HAVE_MDNSRESPONDER 1" >>confdefs.h
 
            DNSSD_BACKEND="dnssd"
@@ -10529,9 +10447,6 @@ then :
 printf "%s\n" "yes" >&6; }
                with_dnssd="mdnsresponder"
 
-printf "%s\n" "#define HAVE_DNSSD 1" >>confdefs.h
-
-
 printf "%s\n" "#define HAVE_MDNSRESPONDER 1" >>confdefs.h
 
                DNSSDLIBS="-ldns_sd"
@@ -10596,9 +10511,6 @@ printf "%s\n" "yes" >&6; }
 printf "%s\n" "#define HAVE_AVAHI 1" >>confdefs.h
 
 
-printf "%s\n" "#define HAVE_DNSSD 1" >>confdefs.h
-
-
 else $as_nop
 
            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
index 6ba5782275b15591256f28c9dcc1b80528447776..80cf59fc9939bcdceddddacb6822d6be5d64c4dc 100644 (file)
 
 #include "cupsd.h"
 #include <grp.h>
-#ifdef HAVE_SHADOW_H
-#  include <shadow.h>
-#endif /* HAVE_SHADOW_H */
-#ifdef HAVE_CRYPT_H
-#  include <crypt.h>
-#endif /* HAVE_CRYPT_H */
 #if HAVE_LIBPAM
 #  ifdef HAVE_PAM_PAM_APPL_H
 #    include <pam/pam_appl.h>
@@ -628,86 +622,9 @@ cupsdAuthorize(cupsd_client_t *con)        /* I - Client connection */
       }
 
       pam_end(pamh, PAM_SUCCESS);
-
 #else
-     /*
-      * Use normal UNIX password file-based authentication...
-      */
-
-      char             *pass;          /* Encrypted password */
-      struct passwd    *pw;            /* User password data */
-#  ifdef HAVE_SHADOW_H
-      struct spwd      *spw;           /* Shadow password data */
-#  endif /* HAVE_SHADOW_H */
-
-
-      pw = getpwnam(username);         /* Get the current password */
-      endpwent();                      /* Close the password file */
-
-      if (!pw)
-      {
-       /*
-       * No such user...
-       */
-
-       cupsdLogClient(con, CUPSD_LOG_ERROR, "Unknown username \"%s\".", username);
-       return;
-      }
-
-#  ifdef HAVE_SHADOW_H
-      spw = getspnam(username);
-      endspent();
-
-      if (!spw && !strcmp(pw->pw_passwd, "x"))
-      {
-       /*
-       * Don't allow blank passwords!
-       */
-
-       cupsdLogClient(con, CUPSD_LOG_ERROR, "Username \"%s\" has no shadow password.", username);
-       return;
-      }
-
-      if (spw && !spw->sp_pwdp[0] && !pw->pw_passwd[0])
-#  else
-      if (!pw->pw_passwd[0])
-#  endif /* HAVE_SHADOW_H */
-      {
-       /*
-       * Don't allow blank passwords!
-       */
-
-       cupsdLogClient(con, CUPSD_LOG_ERROR, "Username \"%s\" has no password.", username);
-       return;
-      }
-
-     /*
-      * OK, the password isn't blank, so compare with what came from the
-      * client...
-      */
-
-      pass = crypt(password, pw->pw_passwd);
-
-      if (!pass || strcmp(pw->pw_passwd, pass))
-      {
-#  ifdef HAVE_SHADOW_H
-       if (spw)
-       {
-         pass = crypt(password, spw->sp_pwdp);
-
-         if (pass == NULL || strcmp(spw->sp_pwdp, pass))
-         {
-           cupsdLogClient(con, CUPSD_LOG_ERROR, "Authentication failed for user \"%s\".", username);
-           return;
-         }
-       }
-       else
-#  endif /* HAVE_SHADOW_H */
-       {
-         cupsdLogClient(con, CUPSD_LOG_ERROR, "Authentication failed for user \"%s\".", username);
-         return;
-       }
-      }
+      cupsdLogClient(con, CUPSD_LOG_ERROR, "No authentication support is available.");
+      return;
 #endif /* HAVE_LIBPAM */
     }
 
index 260f0d496964c98d9b4f8cfcadcf64ebe44db3ba..b41b9ec6da357c246677e87882930609699b07fc 100644 (file)
@@ -3564,7 +3564,6 @@ valid_host(cupsd_client_t *con)           /* I - Client connection */
            !strcmp(con->clientname, "[::1]"));
   }
 
-#ifdef HAVE_DNSSD
  /*
   * Check if the hostname is something.local (Bonjour); if so, allow it.
   */
@@ -3579,10 +3578,8 @@ valid_host(cupsd_client_t *con)          /* I - Client connection */
     for (end --; end > con->clientname && *end != '.'; end --);
   }
 
-  if (end && (!_cups_strcasecmp(end, ".local") ||
-             !_cups_strcasecmp(end, ".local.")))
+  if (end && (!_cups_strcasecmp(end, ".local") || !_cups_strcasecmp(end, ".local.")))
     return (1);
-#endif /* HAVE_DNSSD */
 
  /*
   * Check if the hostname is an IP address...
@@ -3636,10 +3633,7 @@ valid_host(cupsd_client_t *con)          /* I - Client connection */
     }
   }
 
-#ifdef HAVE_DNSSD
-  for (a = (cupsd_alias_t *)cupsArrayGetFirst(DNSSDAlias);
-       a;
-       a = (cupsd_alias_t *)cupsArrayGetNext(DNSSDAlias))
+  for (a = (cupsd_alias_t *)cupsArrayGetFirst(DNSSDAlias); a; a = (cupsd_alias_t *)cupsArrayGetNext(DNSSDAlias))
   {
    /*
     * "ServerAlias *" allows all host values through...
@@ -3660,7 +3654,6 @@ valid_host(cupsd_client_t *con)           /* I - Client connection */
         return (1);
     }
   }
-#endif /* HAVE_DNSSD */
 
  /*
   * Check for interface hostname matches...
index 80dc806112d2ec8c5aac89d9573624ca9de8be74..2221120a8211fc9ceb57640b81c330d7f9c51ab2 100644 (file)
@@ -68,9 +68,7 @@ typedef struct
 static const cupsd_var_t       cupsd_vars[] =
 {
   { "AutoPurgeJobs",           &JobAutoPurge,          CUPSD_VARTYPE_BOOLEAN },
-#ifdef HAVE_DNSSD
   { "BrowseDNSSDSubTypes",     &DNSSDSubTypes,         CUPSD_VARTYPE_STRING },
-#endif /* HAVE_DNSSD */
   { "BrowseWebIF",             &BrowseWebIF,           CUPSD_VARTYPE_BOOLEAN },
   { "Browsing",                        &Browsing,              CUPSD_VARTYPE_BOOLEAN },
   { "Classification",          &Classification,        CUPSD_VARTYPE_STRING },
@@ -81,9 +79,7 @@ static const cupsd_var_t      cupsd_vars[] =
   { "DefaultPolicy",           &DefaultPolicy,         CUPSD_VARTYPE_STRING },
   { "DefaultShared",           &DefaultShared,         CUPSD_VARTYPE_BOOLEAN },
   { "DirtyCleanInterval",      &DirtyCleanInterval,    CUPSD_VARTYPE_TIME },
-#ifdef HAVE_DNSSD
   { "DNSSDHostName",           &DNSSDHostName,         CUPSD_VARTYPE_STRING },
-#endif /* HAVE_DNSSD */
   { "ErrorPolicy",             &ErrorPolicy,           CUPSD_VARTYPE_STRING },
   { "FilterLimit",             &FilterLimit,           CUPSD_VARTYPE_INTEGER },
   { "FilterNice",              &FilterNice,            CUPSD_VARTYPE_INTEGER },
@@ -729,10 +725,8 @@ cupsdReadConfiguration(void)
   Browsing                 = CUPS_DEFAULT_BROWSING;
   DefaultShared            = CUPS_DEFAULT_DEFAULT_SHARED;
 
-#ifdef HAVE_DNSSD
   cupsdSetString(&DNSSDSubTypes, "_cups,_print,_universal");
   cupsdClearString(&DNSSDHostName);
-#endif /* HAVE_DNSSD */
 
   cupsdSetString(&ErrorPolicy, CUPS_DEFAULT_ERROR_POLICY);
 
index 23ff7750087ed18b276a43739071002e449699ba..6b926cfdd177ae979ea2ecdc78fa415f85ac191f 100644 (file)
@@ -36,7 +36,6 @@ static int    avahi_running = 0;
  * Local functions...
  */
 
-#ifdef HAVE_DNSSD
 static char            *get_auth_info_required(cupsd_printer_t *p,
                                                char *buffer, size_t bufsize);
 #  ifdef __APPLE__
@@ -73,7 +72,6 @@ static void           dnssdStop(void);
 static void            dnssdUpdate(void);
 #  endif /* HAVE_MDNSRESPONDER */
 static void            dnssdUpdateDNSSDName(int from_callback);
-#endif /* HAVE_DNSSD */
 
 
 /*
@@ -103,10 +101,8 @@ cupsdDeregisterPrinter(
   * Announce the deletion...
   */
 
-#ifdef HAVE_DNSSD
   if (removeit && (BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDMaster)
     dnssdDeregisterPrinter(p, 1, 0);
-#endif /* HAVE_DNSSD */
 }
 
 
@@ -125,10 +121,8 @@ cupsdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
       (p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_SCANNER)))
     return;
 
-#ifdef HAVE_DNSSD
   if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDMaster)
     dnssdRegisterPrinter(p, 0);
-#endif /* HAVE_DNSSD */
 }
 
 
@@ -142,7 +136,6 @@ cupsdStartBrowsing(void)
   if (!Browsing || !BrowseLocalProtocols)
     return;
 
-#ifdef HAVE_DNSSD
   if (BrowseLocalProtocols & BROWSE_DNSSD)
   {
 #  ifdef HAVE_MDNSRESPONDER
@@ -218,7 +211,6 @@ cupsdStartBrowsing(void)
   */
 
   dnssdRegisterAllPrinters(0);
-#endif /* HAVE_DNSSD */
 }
 
 
@@ -232,7 +224,6 @@ cupsdStopBrowsing(void)
   if (!Browsing || !BrowseLocalProtocols)
     return;
 
-#ifdef HAVE_DNSSD
  /*
   * De-register the individual printers
   */
@@ -245,11 +236,9 @@ cupsdStopBrowsing(void)
 
   if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDMaster)
     dnssdStop();
-#endif /* HAVE_DNSSD */
 }
 
 
-#ifdef HAVE_DNSSD
 /*
  * 'cupsdUpdateDNSSDName()' - Update the computer name we use for browsing...
  */
@@ -1611,4 +1600,3 @@ get_auth_info_required(
 
   return ("none");
 }
-#endif /* HAVE_DNSSD */
index f21de5c69fd2382b81f03a43865246f8c9006fc6..17cfdf81a6610855683276e826b68c389d9abc17 100644 (file)
@@ -28,7 +28,6 @@ VAR int                       Browsing        VALUE(TRUE),
                        BrowseLocalProtocols
                                        VALUE(BROWSE_ALL);
                                        /* Protocols to support for local printers */
-#ifdef HAVE_DNSSD
 VAR char               *DNSSDComputerName VALUE(NULL),
                                        /* Computer/server name */
                        *DNSSDHostName  VALUE(NULL),
@@ -52,7 +51,6 @@ VAR AvahiClient               *DNSSDClient    VALUE(NULL);
 #  endif /* HAVE_MDNSRESPONDER */
 VAR cupsd_srv_t                WebIFSrv        VALUE(NULL);
                                        /* Service reference for the web interface */
-#endif /* HAVE_DNSSD */
 
 
 /*
@@ -63,6 +61,4 @@ extern void   cupsdDeregisterPrinter(cupsd_printer_t *p, int removeit);
 extern void    cupsdRegisterPrinter(cupsd_printer_t *p);
 extern void    cupsdStartBrowsing(void);
 extern void    cupsdStopBrowsing(void);
-#ifdef HAVE_DNSSD
 extern void    cupsdUpdateDNSSDName(void);
-#endif /* HAVE_DNSSD */
index 8ab2ed028bb35f24dcb1a052c9f1c384b7c18a1d..0203f3feb44dfee267bb05bfd790411f65f63a32 100644 (file)
@@ -4960,7 +4960,6 @@ copy_printer_attrs(
   if (!ra || cupsArrayFind(ra, "printer-current-time"))
     ippAddDate(con->response, IPP_TAG_PRINTER, "printer-current-time", ippTimeToDate(curtime));
 
-#ifdef HAVE_DNSSD
   if (!ra || cupsArrayFind(ra, "printer-dns-sd-name"))
   {
     if (printer->reg_name)
@@ -4968,7 +4967,6 @@ copy_printer_attrs(
     else
       ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_NOVALUE, "printer-dns-sd-name", 0);
   }
-#endif /* HAVE_DNSSD */
 
   if (!ra || cupsArrayFind(ra, "printer-error-policy"))
     ippAddString(con->response, IPP_TAG_PRINTER, IPP_TAG_NAME, "printer-error-policy", NULL, printer->error_policy);
@@ -5617,12 +5615,9 @@ create_local_printer(
   * compare case-insensitively.
   */
 
-#ifdef HAVE_DNSSD
   if (DNSSDHostName)
     nameptr = DNSSDHostName;
-  else
-#endif
-  if (ServerName)
+  else if (ServerName)
     nameptr = ServerName;
   else
     nameptr = NULL;
index b5f172b67dd8c5b4b7d7ecc7a5f2576601710801..aba269df1e1c523381cbb02daa199b34b15fe19a 100644 (file)
@@ -825,9 +825,7 @@ main(int  argc,                             /* I - Number of command-line args */
       * Got an error from select!
       */
 
-#ifdef HAVE_DNSSD
       cupsd_printer_t  *p;             /* Current printer */
-#endif /* HAVE_DNSSD */
 
       if (errno == EINTR)              /* Just interrupted by a signal */
         continue;
@@ -867,14 +865,9 @@ main(int  argc,                            /* I - Number of command-line args */
                        job->print_pipes[0], job->print_pipes[1],
                        job->back_pipes[0], job->back_pipes[1]);
 
-#ifdef HAVE_DNSSD
-      for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
-          p;
-          p = (cupsd_printer_t *)cupsArrayNext(Printers))
+      for (p = (cupsd_printer_t *)cupsArrayFirst(Printers); p; p = (cupsd_printer_t *)cupsArrayNext(Printers))
         cupsdLogMessage(CUPSD_LOG_EMERG, "printer[%s] reg_name=\"%s\"", p->name,
                        p->reg_name ? p->reg_name : "(null)");
-#endif /* HAVE_DNSSD */
-
       break;
     }
 
index ce879c01d5a67a221c7f6efa3f671dbfff35a337..46ebe613f2e1a9caf2643b17bcaedf1a0dc94b21 100644 (file)
@@ -744,10 +744,8 @@ cupsdDeletePrinter(
   cupsdClearString(&p->alert);
   cupsdClearString(&p->alert_description);
 
-#ifdef HAVE_DNSSD
   cupsdClearString(&p->pdl);
   cupsdClearString(&p->reg_name);
-#endif /* HAVE_DNSSD */
 
   cupsArrayDelete(p->filetypes);
 
@@ -3534,6 +3532,8 @@ add_printer_formats(cupsd_printer_t *p)   /* I - Printer */
                                        /* MIME type name */
   const char   *preferred = "image/urf";
                                        /* document-format-preferred value */
+  char         pdl[1024];              /* Buffer to build pdl list */
+  mime_filter_t        *filter;                /* MIME filter looping var */
 
 
  /*
@@ -3608,9 +3608,7 @@ add_printer_formats(cupsd_printer_t *p)   /* I - Printer */
   if (i)
     attr->values[0].string.text = _cupsStrAlloc("application/octet-stream");
 
-  for (type = (mime_type_t *)cupsArrayFirst(p->filetypes);
-       type;
-       i ++, type = (mime_type_t *)cupsArrayNext(p->filetypes))
+  for (type = (mime_type_t *)cupsArrayFirst(p->filetypes); type; i ++, type = (mime_type_t *)cupsArrayNext(p->filetypes))
   {
     snprintf(mimetype, sizeof(mimetype), "%s/%s", type->super, type->type);
 
@@ -3619,63 +3617,51 @@ add_printer_formats(cupsd_printer_t *p) /* I - Printer */
 
   ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_MIMETYPE), "document-format-preferred", NULL, preferred);
 
-#ifdef HAVE_DNSSD
+ /*
+  * We only support raw printing if this is not a Tioga PrintJobMgr based
+  * queue and if application/octet-stream is a known type...
+  */
+
+  for (filter = (mime_filter_t *)cupsArrayFirst(MimeDatabase->filters); filter; filter = (mime_filter_t *)cupsArrayNext(MimeDatabase->filters))
   {
-    char               pdl[1024];      /* Buffer to build pdl list */
-    mime_filter_t      *filter;        /* MIME filter looping var */
+    if (filter->dst == p->filetype && strstr(filter->filter, "PrintJobMgr"))
+      break;
+  }
 
+  pdl[0] = '\0';
 
-   /*
-    * We only support raw printing if this is not a Tioga PrintJobMgr based
-    * queue and if application/octet-stream is a known type...
-    */
+ /*
+  * Then list a bunch of formats that are supported by the printer...
+  */
 
-    for (filter = (mime_filter_t *)cupsArrayFirst(MimeDatabase->filters);
-        filter;
-        filter = (mime_filter_t *)cupsArrayNext(MimeDatabase->filters))
+  for (type = (mime_type_t *)cupsArrayFirst(p->filetypes); type; type = (mime_type_t *)cupsArrayNext(p->filetypes))
+  {
+    if (!_cups_strcasecmp(type->super, "application"))
     {
-      if (filter->dst == p->filetype && strstr(filter->filter, "PrintJobMgr"))
-       break;
+      if (!_cups_strcasecmp(type->type, "pdf"))
+       cupsConcatString(pdl, "application/pdf,", sizeof(pdl));
+      else if (!_cups_strcasecmp(type->type, "postscript"))
+       cupsConcatString(pdl, "application/postscript,", sizeof(pdl));
     }
-
-    pdl[0] = '\0';
-
-   /*
-    * Then list a bunch of formats that are supported by the printer...
-    */
-
-    for (type = (mime_type_t *)cupsArrayFirst(p->filetypes);
-        type;
-        type = (mime_type_t *)cupsArrayNext(p->filetypes))
+    else if (!_cups_strcasecmp(type->super, "image"))
     {
-      if (!_cups_strcasecmp(type->super, "application"))
-      {
-        if (!_cups_strcasecmp(type->type, "pdf"))
-         cupsConcatString(pdl, "application/pdf,", sizeof(pdl));
-        else if (!_cups_strcasecmp(type->type, "postscript"))
-         cupsConcatString(pdl, "application/postscript,", sizeof(pdl));
-      }
-      else if (!_cups_strcasecmp(type->super, "image"))
-      {
-        if (!_cups_strcasecmp(type->type, "jpeg"))
-         cupsConcatString(pdl, "image/jpeg,", sizeof(pdl));
-       else if (!_cups_strcasecmp(type->type, "png"))
-         cupsConcatString(pdl, "image/png,", sizeof(pdl));
-       else if (!_cups_strcasecmp(type->type, "pwg-raster"))
-         cupsConcatString(pdl, "image/pwg-raster,", sizeof(pdl));
-       else if (!_cups_strcasecmp(type->type, "urf"))
-         cupsConcatString(pdl, "image/urf,", sizeof(pdl));
-      }
+      if (!_cups_strcasecmp(type->type, "jpeg"))
+       cupsConcatString(pdl, "image/jpeg,", sizeof(pdl));
+      else if (!_cups_strcasecmp(type->type, "png"))
+       cupsConcatString(pdl, "image/png,", sizeof(pdl));
+      else if (!_cups_strcasecmp(type->type, "pwg-raster"))
+       cupsConcatString(pdl, "image/pwg-raster,", sizeof(pdl));
+      else if (!_cups_strcasecmp(type->type, "urf"))
+       cupsConcatString(pdl, "image/urf,", sizeof(pdl));
     }
+  }
 
-    if (pdl[0])
-      pdl[strlen(pdl) - 1] = '\0';     /* Remove trailing comma */
+  if (pdl[0])
+    pdl[strlen(pdl) - 1] = '\0';       /* Remove trailing comma */
 
-    cupsdLogMessage(CUPSD_LOG_DEBUG, "%s: pdl='%s'", p->name, pdl);
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "%s: pdl='%s'", p->name, pdl);
 
-    cupsdSetString(&p->pdl, pdl);
-  }
-#endif /* HAVE_DNSSD */
+  cupsdSetString(&p->pdl, pdl);
 }
 
 
index bb765c1e0d5af591e28e63381b7fb4626a2c9461..4d8fd38e0afea1a5d41959d09acff803041445cc 100644 (file)
@@ -114,7 +114,6 @@ struct cupsd_printer_s
   time_t       marker_time;            /* Last time marker attributes were updated */
   _ppd_cache_t *pc;                    /* PPD cache and mapping data */
 
-#ifdef HAVE_DNSSD
   char         *reg_name,              /* Name used for service registration */
                *pdl;                   /* pdl value for TXT record */
   cupsd_srv_t  ipp_srv;                /* IPP service(s) */
@@ -122,7 +121,6 @@ struct cupsd_printer_s
   cupsd_srv_t  ipps_srv;               /* IPPS service(s) */
   cupsd_srv_t  printer_srv;            /* LPD service */
 #  endif /* HAVE_MDNSRESPONDER */
-#endif /* HAVE_DNSSD */
 };
 
 
index e4630de1e190341ffc51bd6fb9d8e3b4ff5cfe58..4a9e9fce5758fe7a544449685453c6d5606a7887 100644 (file)
@@ -1021,13 +1021,11 @@ sysUpdateNames(void)
        p = (cupsd_printer_t *)cupsArrayNext(Printers))
     cupsdDeregisterPrinter(p, 1);
 
-#  ifdef HAVE_DNSSD
  /*
   * Update the computer name and BTMM domain list...
   */
 
   cupsdUpdateDNSSDName();
-#  endif /* HAVE_DNSSD */
 
  /*
   * Now re-register them...
index 22f06a1c35c0af733cf04139d55fe6986a5879d3..62e5723859ef74f04100b438065efe55121d163c 100644 (file)
@@ -228,20 +228,6 @@ typedef unsigned long useconds_t;
 /* #undef HAVE_PAM_SETCRED */
 
 
-/*
- * Do we have <shadow.h>?
- */
-
-/* #undef HAVE_SHADOW_H */
-
-
-/*
- * Do we have <crypt.h>?
- */
-
-/* #undef HAVE_CRYPT_H */
-
-
 /*
  * Use <stdint.h>?
  */
@@ -405,13 +391,6 @@ typedef unsigned long useconds_t;
 /* #undef HAVE_LIBPAPER */
 
 
-/*
- * Do we have DNS Service Discovery (aka Bonjour) support?
- */
-
-#define HAVE_DNSSD 1
-
-
 /*
  * Do we have mDNSResponder for DNS-SD?
  */
@@ -447,13 +426,6 @@ typedef unsigned long useconds_t;
 /* #undef HAVE_TM_GMTOFF */
 
 
-/*
- * Do we have rresvport_af()?
- */
-
-/* #undef HAVE_RRESVPORT_AF */
-
-
 /*
  * Do we have getifaddrs()?
  */
index 0160c53453bf4bb5b2cf4765053c4bca4e2d67d4..108eaf71186e60a5998fe7a17cdb0ea2a3a43596 100644 (file)
 #endif /* TARGET_OS_OSX */
 
 
-/*
- * Do we have <shadow.h>?
- */
-
-/* #undef HAVE_SHADOW_H */
-
-
-/*
- * Do we have <crypt.h>?
- */
-
-/* #undef HAVE_CRYPT_H */
-
-
 /*
  * Use <stdint.h>?
  */
 /* #undef HAVE_LIBPAPER */
 
 
-/*
- * Do we have DNS Service Discovery (aka Bonjour) support?
- */
-
-#define HAVE_DNSSD 1
-
-
 /*
  * Do we have mDNSResponder for DNS-SD?
  */
 #define HAVE_TM_GMTOFF 1
 
 
-/*
- * Do we have rresvport_af()?
- */
-
-#define HAVE_RRESVPORT_AF 1
-
-
 /*
  * Do we have getifaddrs()?
  */