/************************************************************************
 *
 * This file contains the operating system definitions for UNIX BSD 4.3
 *
 *	Copyright (C) 1999-2008 Cincom Systems, Inc.
 *
 ************************************************************************/

#define	operatingSystem	operatingSystemBSD

#define SIGNALSemaphores 1

#define maxPathNameLength 1024

/* These are the defines to read and write image files */
#define fileHandle int

/* Flags for use with pdOpenImage and pdSeek */
#ifndef assembly
#include <fcntl.h>						/* for open() */
#include <unistd.h>						/* for read, write, close */
#include <sys/file.h>					/* for L_SET */

extern fileHandle pdOpenImage(char *, int, int *);
extern int        pdCloseImage(fileHandle);
extern long       pdRead(fileHandle, void *, long, int *);
extern long       pdWrite(fileHandle, void *, long, int *);

#endif
#define imageReadFlags O_RDONLY
#define imageWriteFlags (O_WRONLY | O_CREAT | O_TRUNC)
#define imageOpenError -1
#define fileHandleForImageResource -2

#define pdSeek(file, offset) lseek(file, offset, L_SET)
