/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 (c) 1990-1996 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ident "%Z%%M% %I% %E% SMI"
#include <unistd.h>
/* The following is an array of fcntl commands. The numbers listed
* below are from SVR4. Array is indexed with SunOS 4.1 numbers to
* obtain the SVR4 numbers.
*/
/* from SVR4 stropts.h */
/* Mask corresponding to the bits above in SunOS 4.x */
struct n_flock {
short l_type;
short l_whence;
long l_start;
long l_sysid;
long l_pid;
} ;
{
}
{
extern int errno;
int narg, i;
return (ret);
else {
i = 0;
else
return (-1);
}
if (i & (S5_S_RDBAND|S5_S_BANDURG|
return (getpid());
return (0);
} else { /* cmd == F_SETOWN */
}
}
}
if (arg & FLAGS_MASK) {
narg |= N_O_NDELAY;
if (arg & O_NONBLOCK)
narg |= N_O_NONBLOCK;
}
return(-1);
}
}
if (ret != -1) {
if (ret & N_FLAGS_MASK) {
if (ret & N_O_NONBLOCK)
narg |= O_NONBLOCK;
if (ret & (N_O_NDELAY))
}
}
}
return(ret);
}