File tree Expand file tree Collapse file tree 2 files changed +368
-193
lines changed Expand file tree Collapse file tree 2 files changed +368
-193
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ template <typename = FD> struct FileDescriptorTraits;
7272
7373#if defined(_WIN32)
7474template <> struct FileDescriptorTraits <HANDLE> {
75+ typedef HANDLE DescriptorType;
7576 static bool IsValid (HANDLE hFile) { return hFile != INVALID_HANDLE_VALUE; }
7677 static void Close (HANDLE hFile) { CloseHandle (hFile); }
7778 static int Read (HANDLE hFile, void *destinationBuffer,
@@ -85,6 +86,8 @@ template <> struct FileDescriptorTraits<HANDLE> {
8586};
8687#endif
8788template <> struct FileDescriptorTraits <int > {
89+ typedef int DescriptorType;
90+ static const int InvalidDescriptor = -1 ;
8891 static bool IsValid (int fd) { return fd >= 0 ; }
8992 static void Close (int fd) { close (fd); }
9093 static int Read (int hFile, void *destinationBuffer,
You can’t perform that action at this time.
0 commit comments