/*
 * fdutils.h -- useful stuff for dealing with file descriptors
 * by Filip Pizlo, 2004
 */

#ifndef FDUTILS_H
#define FDUTILS_H

#include "util.h"
#include "jtypes.h"

jint get_flags(jint fd);
jint set_flags(jint fd, jint flags);

int get_fl(int fd,int flags);
int set_fl(int fd,int flags);
int clr_fl(int fd,int flags);

jint makeNonBlocking(jint fd);
jint makeBlocking(jint fd);

/* set blocking enabled */
jboolean SBE(int fd,jboolean enabled);
jboolean fSBE(FILE *file,jboolean enabled);

#endif



