mirror of https://github.com/aria2/aria2
2008-09-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed compile error with debian mingw32 cross compiler(4.2.1). The configuration is minimum: no torrent, no metalink, so there may be other compile error on their code. * src/a2netcompat.h * src/File.cc * src/File.h * src/SocketCore.cc * src/SocketCore.hpull/1/head
parent
c1dd780b95
commit
b513331407
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2008-09-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Fixed compile error with debian mingw32 cross compiler(4.2.1).
|
||||
The configuration is minimum: no torrent, no metalink, so there may be
|
||||
other compile error on their code.
|
||||
* src/a2netcompat.h
|
||||
* src/File.cc
|
||||
* src/File.h
|
||||
* src/SocketCore.cc
|
||||
* src/SocketCore.h
|
||||
|
||||
2008-09-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Made a socket of incoming peer non-blocking.
|
||||
|
|
11
src/File.cc
11
src/File.cc
|
@ -33,14 +33,17 @@
|
|||
*/
|
||||
/* copyright --> */
|
||||
#include "File.h"
|
||||
#include "Util.h"
|
||||
#include "A2STR.h"
|
||||
#include <cstring>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <deque>
|
||||
#include <sys/types.h>
|
||||
#include <utime.h>
|
||||
|
||||
#include <deque>
|
||||
#include <cstring>
|
||||
|
||||
#include "Util.h"
|
||||
#include "A2STR.h"
|
||||
|
||||
namespace aria2 {
|
||||
|
||||
#ifdef __MINGW32__
|
||||
|
|
|
@ -36,9 +36,11 @@
|
|||
#define _D_FILE_H_
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "a2io.h"
|
||||
#include "TimeA2.h"
|
||||
#include <string>
|
||||
|
||||
namespace aria2 {
|
||||
|
||||
|
|
|
@ -33,15 +33,20 @@
|
|||
*/
|
||||
/* copyright --> */
|
||||
#include "SocketCore.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
|
||||
#include "message.h"
|
||||
#include "a2netcompat.h"
|
||||
#include "DlRetryEx.h"
|
||||
#include "DlAbortEx.h"
|
||||
#include "StringFormat.h"
|
||||
#include "Util.h"
|
||||
#include <unistd.h>
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include "LogFactory.h"
|
||||
|
||||
#ifndef __MINGW32__
|
||||
# define SOCKET_ERRNO (errno)
|
||||
#else
|
||||
|
@ -59,7 +64,7 @@
|
|||
#else
|
||||
# define CLOSE(X) while(close(X) == -1 && errno == EINTR)
|
||||
#endif // __MINGW32__
|
||||
#include "LogFactory.h"
|
||||
|
||||
namespace aria2 {
|
||||
|
||||
SocketCore::SocketCore(int sockType):_sockType(sockType), sockfd(-1) {
|
||||
|
@ -883,14 +888,14 @@ ssize_t SocketCore::readDataFrom(char* data, size_t len,
|
|||
|
||||
std::string SocketCore::getSocketError() const
|
||||
{
|
||||
int error;
|
||||
SOCKOPT_T optlen = sizeof(error);
|
||||
SOCKOPT_T error;
|
||||
socklen_t optlen = sizeof(error);
|
||||
if(getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &error, &optlen) == -1) {
|
||||
throw DlAbortEx(StringFormat("Failed to get socket error: %s",
|
||||
errorMsg()).str());
|
||||
}
|
||||
if(error != 0) {
|
||||
return strerror(error);
|
||||
return errorMsg(error);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -36,11 +36,13 @@
|
|||
#define _D_SOCKET_CORE_H_
|
||||
|
||||
#include "common.h"
|
||||
#include "a2io.h"
|
||||
#include "a2netcompat.h"
|
||||
#include "a2time.h"
|
||||
#include <cstdlib>
|
||||
|
||||
#ifdef HAVE_EPOLL_CREATE
|
||||
# include <sys/epoll.h>
|
||||
#endif // HAVE_EPOLL_CREATE
|
||||
|
||||
#include <string>
|
||||
#include <cstdlib>
|
||||
#include <utility>
|
||||
|
||||
#ifdef HAVE_LIBSSL
|
||||
|
@ -51,9 +53,10 @@
|
|||
#ifdef HAVE_LIBGNUTLS
|
||||
# include <gnutls/gnutls.h>
|
||||
#endif // HAVE_LIBGNUTLS
|
||||
#ifdef HAVE_EPOLL
|
||||
# include <sys/epoll.h>
|
||||
#endif // HAVE_EPOLL
|
||||
|
||||
#include "a2io.h"
|
||||
#include "a2netcompat.h"
|
||||
#include "a2time.h"
|
||||
|
||||
namespace aria2 {
|
||||
|
||||
|
|
Loading…
Reference in New Issue