fcntl.h (5b024a5b76c96ebbaf36ba7803ba4dbe959f7219) | fcntl.h (019c3c436f78111e4ecf8382da622143f7b45c6d) |
---|---|
1/* 2 * CDDL HEADER START 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 --- 4 unchanged lines hidden (view full) --- 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 */ | 1/* 2 * CDDL HEADER START 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 --- 4 unchanged lines hidden (view full) --- 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 |
|
21/* | 22/* |
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. | 23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
23 * Use is subject to license terms. 24 */ 25 26/* Copyright (c) 1988 AT&T */ 27/* All Rights Reserved */ 28 | 24 * Use is subject to license terms. 25 */ 26 27/* Copyright (c) 1988 AT&T */ 28/* All Rights Reserved */ 29 |
29 | |
30#ifndef _FCNTL_H 31#define _FCNTL_H 32 33#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6.1.7 */ 34 35#include <sys/feature_tests.h> 36#if defined(__EXTENSIONS__) || defined(_XPG4) 37#include <sys/stat.h> --- 33 unchanged lines hidden (view full) --- 71#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ 72 73 74/* large file compilation environment setup */ 75#if !defined(_LP64) && _FILE_OFFSET_BITS == 64 76#ifdef __PRAGMA_REDEFINE_EXTNAME 77#pragma redefine_extname open open64 78#pragma redefine_extname creat creat64 | 30#ifndef _FCNTL_H 31#define _FCNTL_H 32 33#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6.1.7 */ 34 35#include <sys/feature_tests.h> 36#if defined(__EXTENSIONS__) || defined(_XPG4) 37#include <sys/stat.h> --- 33 unchanged lines hidden (view full) --- 71#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ 72 73 74/* large file compilation environment setup */ 75#if !defined(_LP64) && _FILE_OFFSET_BITS == 64 76#ifdef __PRAGMA_REDEFINE_EXTNAME 77#pragma redefine_extname open open64 78#pragma redefine_extname creat creat64 |
79#if defined(__EXTENSIONS__) || defined(_XPG6) || !defined(__XOPEN_OR_POSIX) | 79#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) 80#pragma redefine_extname posix_fadvise posix_fadvise64 |
80#pragma redefine_extname posix_fallocate posix_fallocate64 | 81#pragma redefine_extname posix_fallocate posix_fallocate64 |
81#endif /* defined(__EXTENSIONS__) || defined(_XPG6) || ... */ | 82#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || ... */ |
82#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 83 defined(_ATFILE_SOURCE) 84#pragma redefine_extname openat openat64 85#pragma redefine_extname attropen attropen64 86#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 87#else 88#define open open64 89#define creat creat64 | 83#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 84 defined(_ATFILE_SOURCE) 85#pragma redefine_extname openat openat64 86#pragma redefine_extname attropen attropen64 87#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 88#else 89#define open open64 90#define creat creat64 |
90#if defined(__EXTENSIONS__) || defined(_XPG6) || !defined(__XOPEN_OR_POSIX) | 91#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) 92#define posix_fadvise posix_fadvise64 |
91#define posix_fallocate posix_fallocate64 | 93#define posix_fallocate posix_fallocate64 |
92#endif /* defined(__EXTENSIONS__) || defined(_XPG6) || ... */ | 94#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || ... */ |
93#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 94 defined(_ATFILE_SOURCE) 95#define openat openat64 96#define attropen attropen64 97#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 98#endif 99#endif /* !_LP64 && _FILE_OFFSET_BITS == 64 */ 100 101#if defined(_LP64) && defined(_LARGEFILE64_SOURCE) 102#ifdef __PRAGMA_REDEFINE_EXTNAME 103#pragma redefine_extname open64 open 104#pragma redefine_extname creat64 creat | 95#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 96 defined(_ATFILE_SOURCE) 97#define openat openat64 98#define attropen attropen64 99#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 100#endif 101#endif /* !_LP64 && _FILE_OFFSET_BITS == 64 */ 102 103#if defined(_LP64) && defined(_LARGEFILE64_SOURCE) 104#ifdef __PRAGMA_REDEFINE_EXTNAME 105#pragma redefine_extname open64 open 106#pragma redefine_extname creat64 creat |
105#if defined(__EXTENSIONS__) || defined(_XPG6) || !defined(__XOPEN_OR_POSIX) | 107#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) 108#pragma redefine_extname posix_fadvise64 posix_fadvise |
106#pragma redefine_extname posix_fallocate64 posix_fallocate | 109#pragma redefine_extname posix_fallocate64 posix_fallocate |
107#endif /* defined(__EXTENSIONS__) || defined(_XPG6) || ... */ | 110#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || ... */ |
108#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 109 defined(_ATFILE_SOURCE) 110#pragma redefine_extname openat64 openat 111#pragma redefine_extname attropen64 attropen 112#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 113#else 114#define open64 open 115#define creat64 creat | 111#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 112 defined(_ATFILE_SOURCE) 113#pragma redefine_extname openat64 openat 114#pragma redefine_extname attropen64 attropen 115#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 116#else 117#define open64 open 118#define creat64 creat |
116#if defined(__EXTENSIONS__) || defined(_XPG6) || !defined(__XOPEN_OR_POSIX) | 119#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) 120#define posix_fadvise64 posix_fadvise |
117#define posix_fallocate64 posix_fallocate | 121#define posix_fallocate64 posix_fallocate |
118#endif /* defined(__EXTENSIONS__) || defined(_XPG6) || ... */ | 122#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || ... */ |
119#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 120 defined(_ATFILE_SOURCE) 121#define openat64 openat 122#define attropen64 attropen 123#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 124#endif 125#endif /* _LP64 && _LARGEFILE64_SOURCE */ 126 127#if defined(__STDC__) 128 129extern int fcntl(int, int, ...); 130extern int open(const char *, int, ...); 131extern int creat(const char *, mode_t); | 123#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 124 defined(_ATFILE_SOURCE) 125#define openat64 openat 126#define attropen64 attropen 127#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 128#endif 129#endif /* _LP64 && _LARGEFILE64_SOURCE */ 130 131#if defined(__STDC__) 132 133extern int fcntl(int, int, ...); 134extern int open(const char *, int, ...); 135extern int creat(const char *, mode_t); |
132#if defined(__EXTENSIONS__) || defined(_XPG6) || !defined(__XOPEN_OR_POSIX) | 136#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) 137extern int posix_fadvise(int, off_t, off_t, int); |
133extern int posix_fallocate(int, off_t, off_t); | 138extern int posix_fallocate(int, off_t, off_t); |
134#endif /* defined(__EXTENSIONS__) || defined(_XPG6) || ... */ | 139#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || ... */ |
135#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 136 defined(_ATFILE_SOURCE) 137extern int openat(int, const char *, int, ...); 138extern int attropen(const char *, const char *, int, ...); 139#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 140#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) 141extern int directio(int, int); 142#endif 143 144/* transitional large file interface versions */ 145#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ 146 !defined(__PRAGMA_REDEFINE_EXTNAME)) 147extern int open64(const char *, int, ...); 148extern int creat64(const char *, mode_t); | 140#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 141 defined(_ATFILE_SOURCE) 142extern int openat(int, const char *, int, ...); 143extern int attropen(const char *, const char *, int, ...); 144#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 145#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) 146extern int directio(int, int); 147#endif 148 149/* transitional large file interface versions */ 150#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ 151 !defined(__PRAGMA_REDEFINE_EXTNAME)) 152extern int open64(const char *, int, ...); 153extern int creat64(const char *, mode_t); |
149#if defined(__EXTENSIONS__) || defined(_XPG6) || !defined(__XOPEN_OR_POSIX) | 154#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) 155extern int posix_fadvise64(int, off64_t, off64_t, int); |
150extern int posix_fallocate64(int, off64_t, off64_t); | 156extern int posix_fallocate64(int, off64_t, off64_t); |
151#endif /* defined(__EXTENSIONS__) || defined(_XPG6) || ... */ | 157#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || ... */ |
152#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 153 defined(_ATFILE_SOURCE) 154extern int openat64(int, const char *, int, ...); 155extern int attropen64(const char *, const char *, int, ...); 156#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 157#endif 158 159#else /* defined(__STDC__) */ 160 161extern int fcntl(); 162extern int open(); 163extern int creat(); | 158#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 159 defined(_ATFILE_SOURCE) 160extern int openat64(int, const char *, int, ...); 161extern int attropen64(const char *, const char *, int, ...); 162#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 163#endif 164 165#else /* defined(__STDC__) */ 166 167extern int fcntl(); 168extern int open(); 169extern int creat(); |
164#if defined(__EXTENSIONS__) || defined(_XPG6) || !defined(__XOPEN_OR_POSIX) | 170#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) 171extern int posix_fadvise(); |
165extern int posix_fallocate(); | 172extern int posix_fallocate(); |
166#endif /* defined(__EXTENSIONS__) || defined(_XPG6) || ... */ | 173#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || ... */ |
167#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 168 defined(_ATFILE_SOURCE) 169extern int openat(); 170extern int attropen(); 171#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 172 173#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) 174extern int directio(); 175#endif 176 177/* transitional large file interface versions */ 178#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ 179 !defined(__PRAGMA_REDEFINE_EXTNAME)) 180extern int open64(); 181extern int creat64(); | 174#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 175 defined(_ATFILE_SOURCE) 176extern int openat(); 177extern int attropen(); 178#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 179 180#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) 181extern int directio(); 182#endif 183 184/* transitional large file interface versions */ 185#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ 186 !defined(__PRAGMA_REDEFINE_EXTNAME)) 187extern int open64(); 188extern int creat64(); |
182#if defined(__EXTENSIONS__) || defined(_XPG6) || !defined(__XOPEN_OR_POSIX) | 189#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) 190extern int posix_fadvise64(); |
183extern int posix_fallocate64(); | 191extern int posix_fallocate64(); |
184#endif /* defined(__EXTENSIONS__) || defined(_XPG6) || ... */ | 192#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || ... */ |
185#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 186 defined(_ATFILE_SOURCE) 187extern int openat64(); 188extern int attropen64(); 189#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 190#endif 191 192#endif /* defined(__STDC__) */ 193 194#ifdef __cplusplus 195} 196#endif 197 198#endif /* _FCNTL_H */ | 193#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 194 defined(_ATFILE_SOURCE) 195extern int openat64(); 196extern int attropen64(); 197#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 198#endif 199 200#endif /* defined(__STDC__) */ 201 202#ifdef __cplusplus 203} 204#endif 205 206#endif /* _FCNTL_H */ |