DBD-cubrid
view release on metacpan or search on metacpan
cci-src/src/base/porting.h view on Meta::CPAN
#undef O_CREAT
#undef O_RDWR
#undef O_RDONLY
#undef O_TRUNC
#undef O_EXCL
#define O_CREAT _O_CREAT|_O_BINARY
#define O_RDWR _O_RDWR|_O_BINARY
#define O_RDONLY _O_RDONLY|_O_BINARY
#define O_TRUNC _O_TRUNC|_O_BINARY
#define O_EXCL _O_EXCL|_O_BINARY
/* Fake up approxomate DOS definitions see sys/stat.h */
/* for umask() stub */
#define S_IRGRP 0
#define S_IWGRP 0
#define S_IROTH 0
#define S_IWOTH 0
/* read, write, execute for owner */
#define S_IRWXU _S_IREAD | _S_IWRITE | _S_IEXEC
/* rwx for group, same as owner since there are no groups in DOS */
#define S_IRWXG S_IRWXU
/* rwx for other, same as owner since there are no groups in DOS */
#define S_IRWXO S_IRWXU
/* access() mode flags */
#define F_OK 0 /* Test for existence. */
#define W_OK 2 /* Test for write permission. */
#define R_OK 4 /* Test for read permission. */
/* definitions for the WINDOWS implementation of lockf() */
#define F_ULOCK _LK_UNLCK
#define F_LOCK _LK_LOCK
#define F_TLOCK _LK_NBLCK
#define F_TEST -1
/* definitions for the WINDOWS implmentation of pathconf() */
#define _PC_NAME_MAX 4
#define _PC_PATH_MAX 5
#define _PC_NO_TRUNC 8
/*
* MAXHOSTNAMELEN definition
* This is defined in sys/param.h on the linux.
*/
#define MAXHOSTNAMELEN 64
typedef char *caddr_t;
typedef SSIZE_T ssize_t;
#if 0
struct stat
{
_dev_t st_dev;
_ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
_dev_t st_rdev;
_off_t st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
};
extern int stat (const char *path, struct stat *buf);
#endif
extern int gettimeofday (struct timeval *tp, void *tzp);
extern int lockf (int fd, int cmd, long size);
extern char *cuserid (char *string);
extern int getlogin_r (char *buf, size_t bufsize);
extern struct tm *localtime_r (const time_t * time, struct tm *tm_val);
extern char *ctime_r (const time_t * time, char *time_buf);
#if 0
extern int umask (int mask);
#endif
int fsync (int filedes);
long pathconf (char *path, int name);
/*
* Used by the sigfillset() etc. function in pcio.c
*/
typedef struct sigsettype
{
unsigned int mask;
void (*abrt_state) (int);
void (*fpe_state) (int);
void (*ill_state) (int);
void (*int_state) (int);
void (*term_state) (int);
void (*sev_state) (int);
} sigset_t;
int sigfillset (sigset_t * set);
int sigprocmask (int how, sigset_t * set, sigset_t * oldset);
/*
* MS Windows specific operations
*/
extern void pc_init (void);
extern void pc_final (void);
#if defined (ENABLE_UNUSED_FUNCTION)
extern int lock_region (int fd, int cmd, long offset, long size);
#endif
extern int free_space (const char *, int);
#define _longjmp longjmp
/*
#define _setjmp setjmp
*/
( run in 2.637 seconds using v1.01-cache-2.11-cpan-5735350b133 )