We also need to take care of the open flags, seek constants and the
BeOS specific structure attr_info (it contains an off_t). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11583 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
edbadbb0f3
commit
3eb4c2e0cd
@ -56,6 +56,8 @@ typedef struct iovec iovec;
|
||||
#include <Drivers.h> /* for various ioctl structs, etc */
|
||||
#endif
|
||||
|
||||
#include <fs_attr.h>
|
||||
|
||||
#include "errors.h"
|
||||
|
||||
|
||||
@ -184,6 +186,42 @@ struct my_stat {
|
||||
#define MY_S_IWOTH 00002 /* write permission: other */
|
||||
#define MY_S_IXOTH 00001 /* execute permission: other */
|
||||
|
||||
#define MY_O_RDONLY 0 /* read only */
|
||||
#define MY_O_WRONLY 1 /* write only */
|
||||
#define MY_O_RDWR 2 /* read and write */
|
||||
#define MY_O_RWMASK 3 /* Mask to get open mode */
|
||||
|
||||
#define MY_O_CLOEXEC 0x0040 /* close fd on exec */
|
||||
#define MY_O_NONBLOCK 0x0080 /* non blocking io */
|
||||
#define MY_O_EXCL 0x0100 /* exclusive creat */
|
||||
#define MY_O_CREAT 0x0200 /* create and open file */
|
||||
#define MY_O_TRUNC 0x0400 /* open with truncation */
|
||||
#define MY_O_APPEND 0x0800 /* to end of file */
|
||||
#define MY_O_NOCTTY 0x1000 /* currently unsupported */
|
||||
#define MY_O_NOTRAVERSE 0x2000 /* do not traverse leaf link */
|
||||
#define MY_O_ACCMODE 0x0003 /* currently unsupported */
|
||||
#define MY_O_TEXT 0x4000 /* CR-LF translation */
|
||||
#define MY_O_BINARY 0x8000 /* no translation */
|
||||
|
||||
#define MY_SEEK_SET 0
|
||||
#define MY_SEEK_CUR 1
|
||||
#define MY_SEEK_END 2
|
||||
|
||||
|
||||
#ifdef __BEOS__
|
||||
|
||||
typedef attr_info my_attr_info;
|
||||
|
||||
#else // ! __BEOS__
|
||||
|
||||
typedef struct my_attr_info
|
||||
{
|
||||
uint32 type;
|
||||
fs_off_t size;
|
||||
} my_attr_info;
|
||||
|
||||
#endif // ! __BEOS__
|
||||
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
|
Loading…
Reference in New Issue
Block a user