Print this page
6564 F_FLOCKW and F_FLOCK are undefined symbols in SPARC build


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*

  23  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*
  28  * Copyright (c) 1983 Regents of the University of California.
  29  * All rights reserved.  The Berkeley software License Agreement
  30  * specifies the terms and conditions for redistribution.
  31  */
  32 
  33 #ifndef __SYS_FCNTLCOM_H
  34 #define __SYS_FCNTLCOM_H
  35 
  36 #ifdef  __cplusplus
  37 extern "C" {
  38 #endif
  39 
  40 /*
  41  * Rewack the FXXXXX values as _FXXXX so that _POSIX_SOURCE works.
  42  */


 117 /* XXX close on exec request; must match UF_EXCLOSE in user.h */
 118 #define FD_CLOEXEC      1       /* posix */
 119 
 120 /* fcntl(2) requests */
 121 #define F_DUPFD         0       /* Duplicate fildes */
 122 #define F_GETFD         1       /* Get fildes flags (close on exec) */
 123 #define F_SETFD         2       /* Set fildes flags (close on exec) */
 124 #define F_GETFL         3       /* Get file flags */
 125 #define F_SETFL         4       /* Set file flags */
 126 #ifndef _POSIX_SOURCE
 127 #define F_GETOWN        5       /* Get owner - for ASYNC */
 128 #define F_SETOWN        6       /* Set owner - for ASYNC */
 129 #endif  /* !_POSIX_SOURCE */
 130 #define F_GETLK         7       /* Get record-locking information */
 131 #define F_SETLK         8       /* Set or Clear a record-lock (Non-Blocking) */
 132 #define F_SETLKW        9       /* Set or Clear a record-lock (Blocking) */
 133 #ifndef _POSIX_SOURCE
 134 #define F_CNVT          12      /* Convert a fhandle to an open fd */
 135 #endif  /* !_POSIX_SOURCE */
 136 




 137 /* fcntl(2) flags (l_type field of flock structure) */
 138 #define F_RDLCK         1       /* read lock */
 139 #define F_WRLCK         2       /* write lock */
 140 #define F_UNLCK         3       /* remove lock(s) */
 141 #ifndef _POSIX_SOURCE
 142 #define F_UNLKSYS       4       /* remove remote locks for a given system */
 143 #endif  /* !_POSIX_SOURCE */
 144 
 145 /* needed for _syscall(SYS_openat, AT_FDCWD, ...) */
 146 #define AT_FDCWD                0xffd19553
 147 #define AT_SYMLINK_NOFOLLOW     0x1000
 148 #define AT_REMOVEDIR            0x1
 149 
 150 #include <sys/stdtypes.h>
 151 
 152 /* file segment locking set data type - information passed to system by user */
 153 struct flock {
 154         short   l_type;         /* F_RDLCK, F_WRLCK, or F_UNLCK */
 155         short   l_whence;       /* flag to choose starting offset */
 156         long    l_start;        /* relative offset, in bytes */




   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2016 Gary Mills
  24  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  25  * Use is subject to license terms.
  26  */
  27 
  28 /*
  29  * Copyright (c) 1983 Regents of the University of California.
  30  * All rights reserved.  The Berkeley software License Agreement
  31  * specifies the terms and conditions for redistribution.
  32  */
  33 
  34 #ifndef __SYS_FCNTLCOM_H
  35 #define __SYS_FCNTLCOM_H
  36 
  37 #ifdef  __cplusplus
  38 extern "C" {
  39 #endif
  40 
  41 /*
  42  * Rewack the FXXXXX values as _FXXXX so that _POSIX_SOURCE works.
  43  */


 118 /* XXX close on exec request; must match UF_EXCLOSE in user.h */
 119 #define FD_CLOEXEC      1       /* posix */
 120 
 121 /* fcntl(2) requests */
 122 #define F_DUPFD         0       /* Duplicate fildes */
 123 #define F_GETFD         1       /* Get fildes flags (close on exec) */
 124 #define F_SETFD         2       /* Set fildes flags (close on exec) */
 125 #define F_GETFL         3       /* Get file flags */
 126 #define F_SETFL         4       /* Set file flags */
 127 #ifndef _POSIX_SOURCE
 128 #define F_GETOWN        5       /* Get owner - for ASYNC */
 129 #define F_SETOWN        6       /* Set owner - for ASYNC */
 130 #endif  /* !_POSIX_SOURCE */
 131 #define F_GETLK         7       /* Get record-locking information */
 132 #define F_SETLK         8       /* Set or Clear a record-lock (Non-Blocking) */
 133 #define F_SETLKW        9       /* Set or Clear a record-lock (Blocking) */
 134 #ifndef _POSIX_SOURCE
 135 #define F_CNVT          12      /* Convert a fhandle to an open fd */
 136 #endif  /* !_POSIX_SOURCE */
 137 
 138 /* Needed by flock.c */
 139 #define F_FLOCKW        F_SETLKW
 140 #define F_FLOCK         F_SETLK
 141 
 142 /* fcntl(2) flags (l_type field of flock structure) */
 143 #define F_RDLCK         1       /* read lock */
 144 #define F_WRLCK         2       /* write lock */
 145 #define F_UNLCK         3       /* remove lock(s) */
 146 #ifndef _POSIX_SOURCE
 147 #define F_UNLKSYS       4       /* remove remote locks for a given system */
 148 #endif  /* !_POSIX_SOURCE */
 149 
 150 /* needed for _syscall(SYS_openat, AT_FDCWD, ...) */
 151 #define AT_FDCWD                0xffd19553
 152 #define AT_SYMLINK_NOFOLLOW     0x1000
 153 #define AT_REMOVEDIR            0x1
 154 
 155 #include <sys/stdtypes.h>
 156 
 157 /* file segment locking set data type - information passed to system by user */
 158 struct flock {
 159         short   l_type;         /* F_RDLCK, F_WRLCK, or F_UNLCK */
 160         short   l_whence;       /* flag to choose starting offset */
 161         long    l_start;        /* relative offset, in bytes */