Files
2026-07-30 11:19:44 +05:30

106 lines
2.6 KiB
C

/*
******************************************************************************
* HEADER FILE
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: fcntl.h,v $ $Revision: 1.4 $
* $Source: /home/interpeak/CVSRoot/ipxinc/include/sys/fcntl.h,v $
* $Author: lob $ $Date: 2006-04-10 11:03:29 $
* $State: Exp $ $Locker: $
*
* INTERPEAK_COPYRIGHT_STRING
* Design and implementation by Lennart Bang <lob@interpeak.se>
******************************************************************************
*/
#ifndef IP_SYS_FCNTL_H
#define IP_SYS_FCNTL_H
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
****************************************************************************
* 2 CONFIGURATION
****************************************************************************
*/
#include "ipcom_config.h"
/*
****************************************************************************
* 3 INCLUDE
****************************************************************************
*/
#include <unistd.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
****************************************************************************
* 4 DEFINES
****************************************************************************
*/
#define O_RDONLY IP_O_RDONLY
#define O_WRONLY IP_O_WRONLY
#define O_RDWR IP_O_RDWR
#define O_APPEND IP_O_APPEND
#define O_CREAT IP_O_CREAT
/* unsupported: */
#define O_TRUNC IP_O_TRUNC
#define O_EXCL IP_O_EXCL
#define O_NONBLOCK IP_O_NONBLOCK
#define F_WRLCK 1
#define F_SETLK 6
#define F_GETFL 3
#define F_SETFL 4
#define R_OK 4
#define W_OK 2
#define X_OK 1
#define F_OK 0
#define creat(a1,a2) open(a1,O_CREAT|O_WRONLY|O_TRUNC,a2)
struct flock {
Ip_s16 l_type;
Ip_s16 l_whence;
Ip_off_t l_start;
Ip_off_t l_len;
Ip_pid_t l_pid;
};
#ifdef NETSNMP_INTERPEAK
#define fcntl(f,c,a) ipnetsnmp_fcntl(f,c,a)
IP_PUBLIC int ipnetsnmp_fcntl(int fd, int cmd, long arg);
#ifdef open
#undef open
#endif
#define open ipnetsnmp_open
IP_PUBLIC int ipnetsnmp_open(const char* p, int flags, ...);
#endif /* #ifdef NETSNMP_INTERPEAK */
#ifdef __cplusplus
}
#endif
#endif
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/