apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.93k stars 464 forks source link

Remove old IRIX conditional code #4092

Closed michaelrsweet closed 12 years ago

michaelrsweet commented 12 years ago

Version: 1.7-feature CUPS.org User: mike

IRIX hasn't been updated since 2006, and EOL for MIPS-based SGI workstations is 2013. Current SGI offerings are Linux-based, so let's remove all of the IRIX-specific code from CUPS.

michaelrsweet commented 12 years ago

CUPS.org User: mike

Fixed in Subversion repository.

michaelrsweet commented 12 years ago

"str4092.patch":

Index: backend/usb-unix.c

--- backend/usb-unix.c (revision 10629) +++ backend/usb-unix.c (working copy) @@ -257,7 +257,6 @@

 close(fd);

} -#elif defined(__sgi)

elif defined(__sun) && defined(ECPPIOC_GETDEVID)

int i; /* Looping var / int fd; / File descriptor */

Index: config-scripts/cups-manpages.m4

--- config-scripts/cups-manpages.m4 (revision 10629) +++ config-scripts/cups-manpages.m4 (working copy) @@ -28,12 +28,6 @@ AMANDIR="/usr/share/man" PMANDIR="/usr/share/man" ;;

- fi

- ;;

    Linux | GNU | GNU/k*BSD*)
        # Linux/HURD seems to choose an init.d directory at random...
        if test -d /sbin/init.d; then

Index: config-scripts/cups-opsys.m4

--- config-scripts/cups-opsys.m4 (revision 10629) +++ config-scripts/cups-opsys.m4 (working copy) @@ -3,7 +3,7 @@ dnl dnl Operating system stuff for CUPS. dnl -dnl Copyright 2007-2011 by Apple Inc. +dnl Copyright 2007-2012 by Apple Inc. dnl Copyright 1997-2006 by Easy Software Products, all rights reserved. dnl dnl These coded instructions, statements, and computer programs are the @@ -22,9 +22,6 @@ GNU* | GNU/*) uname="GNU" ;;

-

The BOOTP protocol is used when you need to provide additional information such as the location of a configuration file to the network interface. Using the standard bootpd(8) program supplied with UNIX you simply need to add a line to the /etc/bootptab file; for IRIX:

+

The BOOTP protocol is used when you need to provide additional information such as the location of a configuration file to the network interface. Using the standard bootpd(8) program supplied with UNIX you simply need to add a line to the /etc/bootptab file:

-myprinter 08:00:69:00:12:34 192.0.2.2 myprinter.boot

## -

-

Newer versions of bootpd use a different format:

-

myprinter:ha=080069001234:ip=192.0.2.2:t144=myprinter.boot

Index: doc/help/spec-cmp.html

--- doc/help/spec-cmp.html (revision 10629) +++ doc/help/spec-cmp.html (working copy) @@ -245,10 +245,6 @@

Portable tarball with install script

- inst - IRIX inst/tardist -

-

pkg Solaris pkgadd

@@ -268,10 +264,6 @@

swinstall HP-UX swinstall

-

Finally, the tools/testrpm and tools/testosx scripts can be used to create binary packages from the current working copy for testing on Linux and OS X, respectively:

Index: doc/help/ref-cupsd-conf.html.in

--- doc/help/ref-cupsd-conf.html.in (revision 10629) +++ doc/help/ref-cupsd-conf.html.in (working copy) @@ -21,7 +21,7 @@

-

CUPS 1.1.13PrintcapGUI

-

Examples

-

-PrintGUI /usr/bin/glpoptions

-

-

Description

-

The PrintcapGUI directive sets the program to -associate with the IRIX printer GUI interface script which is -used by IRIX applications to display printer-specific options.

-There is no default program.

CUPS 1.1.21ReloadTimeout

Examples

Index: systemv/lpstat.c

--- systemv/lpstat.c (revision 10629) +++ systemv/lpstat.c (working copy) @@ -205,38 +205,6 @@ } break;

-#ifdef __sgi

- op = 'b';

- */

- check_dest(argv[0], argv[i] + 2, &num_dests, &dests);

- argv[0]);

@@ -299,18 +267,7 @@ break;

     case 'l' : /* Long status or long job status */

-#ifdef __sgi

- op = 'l';

- check_dest(argv[0], argv[i] + 2, &num_dests, &dests);

-#ifdef __sgi -# define ADDR_CAST (struct sockaddr ) -#else -# define ADDR_CAST (char )

-#endif /* __sgi */

/*

-# if defined(sgi) || (defined(__APPLE) && !defined(_SOCKLEN_T)) +# if defined(APPLE) && !defined(_SOCKLEN_T) /*

- */

@@ -96,10 +92,6 @@ static void log_ipp_conformance(cupsd_printer_t _p, const char reason); static ipp_t new_media_col(_pwg_size_t size, const char source, const char type); -#ifdef __sgi -static void write_irix_config(cupsd_printer_t p); -static void write_irix_state(cupsd_printert *p); -#endif / __sgi / static void write_xml_string(cups_file_t fp, const char *s);

@@ -720,9 +712,6 @@ { int i, /* Looping var / changed = 0; / Class changed? */ -#ifdef __sgi

- */

-#ifdef __sgi

- unlink(filename);

- unlink(filename);

- unlink(filename);

- unlink(filename);

- unlink(filename);

@@ -1657,14 +1621,6 @@ (long)printer->marker_time);

 cupsFilePuts(fp, "</Printer>\n");

-#ifdef __sgi

- */

-#ifdef __sgi /*

- */

@@ -2653,10 +2600,6 @@ */

 p->state_time = time(NULL);

-#ifdef __sgi

-#ifdef __sgi /*

- */

@@ -5079,262 +5012,7 @@ }

-#ifdef __sgi /*

- */

-static void -write_irix_config(cupsd_printer_t p) / I - Printer to update */ -{

- ipp_attribute_t attr; / Attribute data */

- */

- snprintf(filename, sizeof(filename), "/var/spool/lp/interface/%s", p->name);

- cupsFilePuts(fp, "#!/bin/sh\n");

- cupsFilePuts(fp, "NAME=\"Remote Destination\"\n");

- cupsFilePuts(fp, "TYPE=MonoPostScript\n");

- cupsFilePrintf(fp, "HOSTPRINTER=%s\n", p->name);

- cupsFileClose(fp);

- }

- */

- snprintf(filename, sizeof(filename), "/var/spool/lp/member/%s", p->name);

- cupsFilePuts(fp, "/dev/null\n");

- cupsFileClose(fp);

- }

- */

- snprintf(filename, sizeof(filename), "/var/spool/lp/gui_interface/ELF/%s.gui", p->name);

- cupsFilePrintf(fp, "%s -d %s -o \"$3\"\n", PrintcapGUI, p->name);

- cupsFileClose(fp);

- }

- */

- snprintf(filename, sizeof(filename), "/var/spool/lp/pod/%s.config", p->name);

- cupsFilePuts(fp, "Status Update Wait | 10 seconds\n");

- cupsFileClose(fp);

- */

-static void -write_irix_state(cupsd_printer_t p) / I - Printer to update */ -{

- int tag; /* Status tag value */

- */

- snprintf(filename, sizeof(filename), "/var/spool/lp/pod/%s.status", p->name);

- cupsFilePrintf(fp, "Information | 04 00 00 | %s\n", p->state_message);

- cupsFileClose(fp);

- }

- */

- snprintf(filename, sizeof(filename), "/var/spool/lp/activeicons/%s", p->name);

- tag = 66272;

- tag |= 8;

- tag |= 1;

- tag |= 2;

- cupsFilePrintf(fp, "#Tag %d\n", tag);

- cupsFileClose(fp);

- }

- */

- snprintf(filename, sizeof(filename), "/var/spool/lp/default");

- cupsFilePrintf(fp, "%s\n", DefaultPrinter->name);

- cupsFileClose(fp);

Index: scheduler/cups.sh.in

--- scheduler/cups.sh.in (revision 10629) +++ scheduler/cups.sh.in (working copy) @@ -4,7 +4,7 @@ #

Startup/shutdown script for CUPS.

# -# Copyright 2007-2011 by Apple Inc. +# Copyright 2007-2012 by Apple Inc.

Copyright 1997-2007 by Easy Software Products, all rights reserved.

#

These coded instructions, statements, and computer programs are the

@@ -35,18 +35,6 @@

OS-Dependent Configuration

case "uname" in

- IS_ON=/sbin/chkconfig

- ;;

*BSD*)
        IS_ON=:
    ECHO=echo

@@ -147,7 +135,7 @@ HP-UX* | AIX* | SINIX) pid=`ps -e | awk '{if (match($4, "./cupsd$") || $4 == "cupsd") print $1}'` ;;

-#ifdef __sgi /*

- */

- fchown(cupsFileNumber(fp), User, Group);

@@ -1131,18 +1105,6 @@ krb5_free_context(KerberosContext);

endif /* HAVE_GSSAPI */

-#ifdef __sgi

- */