home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1999 February
/
MACPOWER-1999-02.ISO.7z
/
MACPOWER-1999-02.ISO
/
9902⁄AMUG
/
UTILITY
/
mac06-0.95.sit
/
mac06-0.95
/
usr
/
include
/
fcntl.h
< prev
next >
Wrap
Text File
|
1998-09-23
|
1KB
|
51 lines
/* mac06ゥ1997 by HNS/DSITRI hns@computer.org
** fcntl.h
*/
#pragma once
#include "stdarg.h"
#include "sys/types.h"
struct flock
{
short l_type;
short l_whence;
off_t l_start;
off_t l_len;
pid_t l_pid;
};
#define F_DUPFD 0
#define FD_CLOEXEC 0x0001
#define F_GETFD 1
#define F_SETFD 2
#define F_GETFL 3
#define F_SETFL 4
#define F_GETLK 5
#define F_SETLK 6
#define F_SETLKW 7
#define F_RDLCK 0x0001
#define F_WRLCK 0x0002
#define F_UNLCK 0x0003
#define O_APPEND 0x0020
#define O_CREAT 0x0004
#define O_EXCL 0x0010
#define O_NOCTTY 0x0400
#define O_NONBLOCK 0x0800
#define O_WRONLY 0x0001
#define O_RDONLY 0x0002
#define O_RDWR (O_WRONLY|O_RDONLY)
#define O_TRUNC 0x0008
int fcntl(int fd, int cmd, ...);
int mkdir(const char *name, mode_t mode);
#ifndef _POSIX_SOURCE
int mknode(const char *name, mode_t mode, const char *driver, int minor);
#endif
int open(const char *name, int mode, ...);
#define creat(name, mode) open((name), O_CREAT|O_TRUNC|O_WRONLY, (mode))
/* EOF */