-/* $OpenBSD: ffilecopy.c,v 1.3 1996/08/22 00:34:49 deraadt Exp $ */
+/* $OpenBSD: ffilecopy.c,v 1.4 1996/12/04 08:21:00 niklas Exp $ */
/*
* Copyright (c) 1991 Carnegie Mellon University
if (fflush (there) == EOF) /* flush pending output */
return (EOF);
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
if ((here->_r) > 0) { /* flush buffered input */
i = write (therefile, here->_p, here->_r);
if (i != here->_r) return (EOF);
i = filecopy (herefile, therefile); /* fast file copy */
if (i < 0) return (EOF);
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
(here->_flags) |= __SEOF; /* indicate EOF */
#else
(here->_flag) |= _IOEOF; /* indicate EOF */