/* Copyright (C) 2000 Artifex Software, Inc. All rights reserved.
  
  This file is part of AFPL Ghostscript.
  
  AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  distributor accepts any responsibility for the consequences of using it, or
  for whether it serves any particular purpose or works at all, unless he or
  she says so in writing.  Refer to the Aladdin Free Public License (the
  "License") for full details.
  
  Every copy of AFPL Ghostscript must include a copy of the License, normally
  in a plain ASCII text file named PUBLIC.  The License grants you the right
  to copy, modify and redistribute AFPL Ghostscript, but only under certain
  conditions described in the License.  Among other things, the License
  requires that the copyright notice and this notice be preserved on all
  copies.
*/

/*$Id: unistd_.h,v 1.1 2000/12/19 03:35:40 alexcher Exp $ */
/* Generic substitute for Unix unistd.h */

#ifndef unistd__INCLUDED
#  define unistd__INCLUDED

/* We must include std.h before any file that includes sys/types.h. */
#include "std.h"

/*
 * It's likely that you will have to edit the next lines on some Unix
 * and most non-Unix platforms, since there is no standard (ANSI or
 * otherwise) for where to find these definitions.
 */

#if defined(_MSC_VER) && defined(__WIN32__)
#  include <io.h>
#  define fsync(handle) _commit(handle)
#else
#  include <unistd.h>
#endif

/*
 * unistd.h may declare unlink in a way that conflicts with stdio_.h if
 * const has been disabled.
 */
#define unlink unlink_

#endif   /* unistd__INCLUDED */
