aboutsummaryrefslogtreecommitdiff
path: root/src/util/disk.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-14 11:08:43 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-14 11:08:43 +0000
commit53da062e08f1d1d4392b3a40396bb45cc093e2ac (patch)
tree40b132f38c1d6b46476bfd9c1917070956ce4861 /src/util/disk.h
parent1debac4608e78f4a7800252ba9a91b4f5a376b42 (diff)
downloadgnunet-53da062e08f1d1d4392b3a40396bb45cc093e2ac.tar.gz
gnunet-53da062e08f1d1d4392b3a40396bb45cc093e2ac.zip
LRN: Added-the-ability-to-substitute-scheduler-select.
Diffstat (limited to 'src/util/disk.h')
-rw-r--r--src/util/disk.h45
1 files changed, 6 insertions, 39 deletions
diff --git a/src/util/disk.h b/src/util/disk.h
index f287834b8..fee43abb8 100644
--- a/src/util/disk.h
+++ b/src/util/disk.h
@@ -22,49 +22,14 @@
22 * @file util/disk.h 22 * @file util/disk.h
23 * @brief Internal DISK related helper functions 23 * @brief Internal DISK related helper functions
24 * @author Nils Durner 24 * @author Nils Durner
25 */ 25 */
26
27#ifndef GNUNET_DISK_H_ 26#ifndef GNUNET_DISK_H_
28#define GNUNET_DISK_H_ 27#define GNUNET_DISK_H_
29 28
30#include "gnunet_disk_lib.h" 29#include "gnunet_disk_lib.h"
31
32/**
33 * Handle used to access files (and pipes).
34 */
35struct GNUNET_DISK_FileHandle
36{
37
38#ifdef MINGW
39 /**
40 * File handle under W32.
41 */
42 HANDLE h;
43
44 /**
45 * Type
46 */
47 enum {GNUNET_DISK_FILE, GNUNET_PIPE} type;
48 30
49 /**
50 * Structure for overlapped reading (for pipes)
51 */
52 OVERLAPPED *oOverlapRead;
53
54 /**
55 * Structure for overlapped writing (for pipes)
56 */
57 OVERLAPPED *oOverlapWrite;
58#else
59
60 /**
61 * File handle on other OSes.
62 */
63 int fd;
64
65#endif /* */
66}; 31};
67 32
68/** 33/**
69 * Retrieve OS file handle 34 * Retrieve OS file handle
70 * 35 *
@@ -75,6 +40,8 @@ struct GNUNET_DISK_FileHandle
75 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise 40 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
76 */ 41 */
77int GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle 42int GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle
78 *fh, void *dst, size_t dst_len); 43 *fh,
79 44 void *dst,
45 size_t dst_len);
46
80#endif /* GNUNET_DISK_H_ */ 47#endif /* GNUNET_DISK_H_ */