/*
+ * $Id: ad_sendfile.c,v 1.3 2001-06-29 14:14:46 rufustfirefly Exp $
+ *
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* All rights reserved. See COPYRIGHT.
*
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdio.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
fd = ad_sendfile_init(ad, eid, &off, 0);
#ifdef __linux__
cc = sendfile(sock, fd, &off, len);
-#endif
+#endif /* __linux__ */
#ifdef BSD4_4
if (sendfile(fd, sock, off, len, NULL, &cc, 0) < 0)
return -1;
-#endif
+#endif /* BSD4_4 */
return cc;
}
-#endif
+#endif /* HAVE_SENDFILE_READ */
#if 0
#ifdef HAVE_SENDFILE_WRITE
ad_setentrylen(ad, eid, off);
return cc;
-#endif
+#endif /* __linux__ */
}
-#endif
-#endif
+#endif /* HAVE_SENDFILE_WRITE */
+#endif /* 0 */