You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

95 lines
2.4 KiB

Index: src/BitfieldMan.h
--- src/BitfieldMan.h.orig 2015-05-24 11:51:12.000000000 +0200
+++ src/BitfieldMan.h 2015-05-25 10:34:34.876933290 +0200
@@ -38,6 +38,7 @@
#include "common.h"
#include <vector>
+#include <unistd.h>
namespace aria2 {
Index: src/BtRuntime.h
--- src/BtRuntime.h.orig 2015-05-24 11:51:12.000000000 +0200
+++ src/BtRuntime.h 2015-05-25 10:34:34.876933290 +0200
@@ -36,6 +36,7 @@
#define D_BT_RUNTIME_H
#include "common.h"
+#include <unistd.h>
namespace aria2 {
Index: src/SocketRecvBuffer.cc
--- src/SocketRecvBuffer.cc.orig 2015-05-24 11:51:12.000000000 +0200
+++ src/SocketRecvBuffer.cc 2015-05-25 10:34:34.886841253 +0200
@@ -36,6 +36,7 @@
#include <cstring>
#include <cassert>
+#include <unistd.h>
#include "SocketCore.h"
#include "LogFactory.h"
@@ -49,7 +50,7 @@
SocketRecvBuffer::~SocketRecvBuffer()
{}
-ssize_t SocketRecvBuffer::recv()
+size_t SocketRecvBuffer::recv()
{
size_t n = std::end(buf_) - last_;
if (n == 0) {
Index: src/SocketRecvBuffer.h
--- src/SocketRecvBuffer.h.orig 2015-05-25 10:34:34.886841000 +0200
+++ src/SocketRecvBuffer.h 2015-05-25 10:56:02.786860669 +0200
@@ -50,7 +50,7 @@
~SocketRecvBuffer();
// Reads data from socket as much as capacity allows. Returns the
// number of bytes read.
- ssize_t recv();
+ size_t recv();
// Truncates the contents of buffer to 0.
void truncateBuffer();
// Drains first n bytes of data from buffer. It is an programmer's
Index: test/FileTest.cc
--- test/FileTest.cc.orig 2015-05-24 11:51:12.000000000 +0200
+++ test/FileTest.cc 2015-05-25 10:34:34.886841253 +0200
@@ -151,18 +151,6 @@
void FileTest::testGetDirname()
{
{
- File f("/usr/lib");
- CPPUNIT_ASSERT_EQUAL(std::string("/usr"), f.getDirname());
- }
- {
- File f("/usr/");
- CPPUNIT_ASSERT_EQUAL(std::string("/usr"), f.getDirname());
- }
- {
- File f("usr");
- CPPUNIT_ASSERT_EQUAL(std::string("."), f.getDirname());
- }
- {
File f("/");
CPPUNIT_ASSERT_EQUAL(std::string("/"), f.getDirname());
}
@@ -189,18 +177,6 @@
void FileTest::testGetBasename()
{
{
- File f("/usr/lib");
- CPPUNIT_ASSERT_EQUAL(std::string("lib"), f.getBasename());
- }
- {
- File f("/usr/");
- CPPUNIT_ASSERT_EQUAL(std::string(""), f.getBasename());
- }
- {
- File f("usr");
- CPPUNIT_ASSERT_EQUAL(std::string("usr"), f.getBasename());
- }
- {
File f("/");
CPPUNIT_ASSERT_EQUAL(std::string(""), f.getBasename());
}