lpd-misc.c revision e059026e2da8f12ef0ebea9d686d67f32660cfc0
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*/
/* $Id: lpd-misc.c 155 2006-04-26 02:34:54Z ktou $ */
#define __EXTENSIONS__ /* for strtok_r() */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdarg.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include <wait.h>
#include <stropts.h>
#include <papi_impl.h>
#include <config-site.h>
char *
{
char tmp;
int count = 0;
if (count != 0)
return (buf);
return (NULL);
}
char *
{
else
}
return (result);
}
static int
{
int fd = -1;
#else
#ifdef CMSG_DATA
#else
#endif
msg.msg_namelen = 0;
fd = -1;
#ifdef CMSG_DATA
else
#endif
#endif
return (fd);
}
int
{
return (-1);
#ifndef SUID_LPD_PORT
#define SUID_LPD_PORT "/usr/lib/print/lpd-port"
#endif
/* server */
/* timeout */
if (timeout > 0) {
}
/* operation */
/* queue */
tmp = "";
} else {
else
tmp++;
}
/* args */
#else
#endif
case -1: /* failed */
break;
case 0: /* child */
perror("exec");
exit(1);
break;
default: { /* parent */
if (errno == 0)
}
}
return (rc);
}