]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/dsi/dsi_write.c
Merge master
[netatalk.git] / libatalk / dsi / dsi_write.c
index 59f8e387191e7eb0fe5abdc18177b2eea846014c..84a6e9e602c00d3f594c88757960f81d06cdccd3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dsi_write.c,v 1.4 2005-04-28 20:50:02 bfernhomberg Exp $
+ * $Id: dsi_write.c,v 1.5 2009-10-20 04:31:41 didg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
 
 /* this streams writes */
 #include <stdio.h>
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif /* HAVE_UNISTD_H */
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/time.h>
-#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
-#endif /* HAVE_FCNTL_H */
 #include <string.h>
 
 #include <atalk/dsi.h>
@@ -36,9 +32,6 @@
  * for arbitrary buffers. */
 size_t dsi_writeinit(DSI *dsi, void *buf, const size_t buflen _U_)
 {
-#ifdef TIMER_ON_READ
-  const struct itimerval none = {{0, 0}, {0, 0}};
-#endif  
   size_t len, header;
 
   /* figure out how much data we have. do a couple checks for 0 
@@ -56,14 +49,6 @@ size_t dsi_writeinit(DSI *dsi, void *buf, const size_t buflen _U_)
   } else
     len = 0;
 
-#ifdef TIMER_ON_READ
-  /* deal with signals. i'm doing it this way to ensure that we don't
-   * get confused if a writeflush on zero remaining data is, for some
-   * reason, needed. */
-  sigprocmask(SIG_BLOCK, &dsi->sigblockset, &dsi->oldset);
-  dsi->sigblocked = 1;
-  setitimer(ITIMER_REAL, &none, &dsi->savetimer);
-#endif  
   return len;
 }
 
@@ -79,10 +64,6 @@ size_t dsi_write(DSI *dsi, void *buf, const size_t buflen)
     dsi->datasize -= length;
     return length;
   }
-#ifdef TIMER_ON_READ
-  setitimer(ITIMER_REAL, &dsi->savetimer, NULL);
-  sigprocmask(SIG_SETMASK, &dsi->oldset, NULL);
-#endif
   return 0;
 }
 
@@ -99,8 +80,4 @@ void dsi_writeflush(DSI *dsi)
     else
       break;
   }
-#ifdef TIMER_ON_READ
-  setitimer(ITIMER_REAL, &dsi->savetimer, NULL);
-  sigprocmask(SIG_SETMASK, &dsi->oldset, NULL);
-#endif  
 }