]> arthur.barton.de Git - netatalk.git/blobdiff - bin/megatron/nad.c
Merge master
[netatalk.git] / bin / megatron / nad.c
index 250f51ac196a501be670979e2b5f63d4c06c0886..9d0b64bf5627612a6bfeb1502d0512b6b8d27f1a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nad.c,v 1.17 2009-10-14 01:38:28 didg Exp $
+ * $Id: nad.c,v 1.18 2010-01-27 21:27:53 didg Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -16,9 +16,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <dirent.h>
-#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
-#endif /* HAVE_FCNTL_H */
 
 #include <atalk/adouble.h>
 #include <atalk/util.h>
@@ -691,9 +689,9 @@ int nad_header_write(struct FHeader *fh)
 
 static int             forkeid[] = { ADEID_DFORK, ADEID_RFORK };
 
-int nad_read(int fork, char *forkbuf, int bufc)
+ssize_t nad_read(int fork, char *forkbuf, size_t bufc)
 {
-    int                        cc = 0;
+    ssize_t            cc = 0;
 
 #if DEBUG
     fprintf( stderr, "Entering nad_read\n" );
@@ -713,11 +711,11 @@ int nad_read(int fork, char *forkbuf, int bufc)
     return( cc );
 }
 
-int nad_write(int fork, char *forkbuf, int bufc)
+ssize_t nad_write(int fork, char *forkbuf, size_t bufc)
 {
     char               *buf_ptr;
-    int                        writelen;
-    int                        cc = 0;
+    size_t             writelen;
+    ssize_t            cc = 0;
 
 #if DEBUG
     fprintf( stderr, "Entering nad_write\n" );