home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
uccs
/
root.14
/
udk
/
usr
/
include
/
fcntl.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-08-19
|
3KB
|
76 lines
/*
* Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
* SANTA CRUZ OPERATION INC.
*
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*/
#ifndef _FCNTL_H
#define _FCNTL_H
#ident "@(#)sgs-head:common/head/fcntl.h 1.6.5.5"
#include <sys/types.h>
#include <sys/fcntl.h>
#ifndef S_IRWXU
# define S_IRWXU 00700 /* read, write, execute: owner */
# define S_IRUSR 00400 /* read permission: owner */
# define S_IWUSR 00200 /* write permission: owner */
# define S_IXUSR 00100 /* execute permission: owner */
# define S_IRWXG 00070 /* read, write, execute: group */
# define S_IRGRP 00040 /* read permission: group */
# define S_IWGRP 00020 /* write permission: group */
# define S_IXGRP 00010 /* execute permission: group */
# define S_IRWXO 00007 /* read, write, execute: other */
# define S_IROTH 00004 /* read permission: other */
# define S_IWOTH 00002 /* write permission: other */
# define S_IXOTH 00001 /* execute permission: other */
# define S_ISUID 0x800 /* set user id on execution */
# define S_ISGID 0x400 /* set group id on execution */
#endif
#ifndef SEEK_SET
# define SEEK_SET 0 /* Set file pointer to "offset" */
# define SEEK_CUR 1 /* Set file pointer to current plus "offset" */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern int fcntl(int, int, ...);
extern int open(const char *, int, ...);
extern int creat(const char *, mode_t);
#if defined(_LARGEFILE64_SOURCE) || defined(_FILE_OFFSET_BITS) \
|| !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE) \
&& !defined(_POSIX_C_SOURCE)
extern int open32(const char *, int, ...);
extern int creat32(const char *, mode_t);
extern int open64(const char *, int, ...);
extern int creat64(const char *, mode_t);
#endif /*defined(_LARGEFILE64_SOURCE) || ...*/
#ifdef __cplusplus
}
#endif
#if _FILE_OFFSET_BITS - 0 == 32
#undef open
#define open open32
#undef creat
#define creat creat32
#elif _FILE_OFFSET_BITS - 0 == 64
#undef open
#define open open64
#undef creat
#define creat creat64
#elif defined(_FILE_OFFSET_BITS)
#error "_FILE_OFFSET_BITS, if defined, must be 32 or 64"
#endif /*_FILE_OFFSET_BITS*/
#endif /*_FCNTL_H*/