Select Git revision
-
Martin Stjernholm authored
Rev: src/fdlib.h:1.59
Martin Stjernholm authoredRev: src/fdlib.h:1.59
fdlib.h 13.55 KiB
/*
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
|| $Id: fdlib.h,v 1.59 2006/07/05 20:13:56 mast Exp $
*/
#ifndef FDLIB_H
#define FDLIB_H
#include "global.h"
#include "pike_macros.h"
#include "pike_netlib.h"
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
#ifdef HAVE_SOCKET_H
#include <socket.h>
#endif /* HAVE_SOCKET_H */
#include "pike_netlib.h"
#define fd_INTERPROCESSABLE 1
#define fd_CAN_NONBLOCK 2
#define fd_CAN_SHUTDOWN 4
#define fd_BUFFERED 8
#define fd_BIDIRECTIONAL 16
#define fd_REVERSE 32
#if defined(HAVE_WINSOCK_H)
#define HAVE_FD_FLOCK
#define FILE_CAPABILITIES (fd_INTERPROCESSABLE)
#define PIPE_CAPABILITIES (fd_INTERPROCESSABLE | fd_BUFFERED)
#define SOCKET_CAPABILITIES (fd_BIDIRECTIONAL | fd_CAN_NONBLOCK | fd_CAN_SHUTDOWN)
#ifndef FD_SETSIZE
#define FD_SETSIZE MAX_OPEN_FILEDESCRIPTORS
#endif
#include <winbase.h>
typedef int FD;
#if _INTEGRAL_MAX_BITS >= 64
typedef struct _stati64 PIKE_STAT_T;
typedef __int64 PIKE_OFF_T;
#define PRINTPIKEOFFT PRINTINT64