2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Merged Ross's mingw patch.
	* src/DHTRoutingTableDeserializer.cc
	* src/DHTRoutingTableSerializer.cc
	* src/Platform.{h, cc}
	* src/timegm.h
	* src/gettimeofday.h
	* src/getaddrinfo.h
	* src/SocketCore.h
	* src/common.h
	* src/inet_aton.h
	* src/DownloadEngine.h
	* src/gai_strerror.h
	* src/a2netcompat.h
	* configure.ac
	* configure
	* aclocal.m4
pull/1/head
Tatsuhiro Tsujikawa 2008-03-03 15:41:58 +00:00
parent 55552adb93
commit 62e1cbd0c0
17 changed files with 85 additions and 13 deletions

View File

@ -1,3 +1,22 @@
2008-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Merged Ross's mingw patch.
* src/DHTRoutingTableDeserializer.cc
* src/DHTRoutingTableSerializer.cc
* src/Platform.{h, cc}
* src/timegm.h
* src/gettimeofday.h
* src/getaddrinfo.h
* src/SocketCore.h
* src/common.h
* src/inet_aton.h
* src/DownloadEngine.h
* src/gai_strerror.h
* src/a2netcompat.h
* configure.ac
* configure
* aclocal.m4
2008-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Included missing iostream.

6
aclocal.m4 vendored
View File

@ -180,7 +180,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
fi
fi
if test $ok = yes; then
AC_MSG_RESULT(yes)
AC_MSG_RESULT([yes ($libgcrypt_config_version)])
else
AC_MSG_RESULT(no)
fi
@ -192,10 +192,10 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
if test "$tmp" -gt 0 ; then
AC_MSG_CHECKING([LIBGCRYPT API version])
if test "$req_libgcrypt_api" -eq "$tmp" ; then
AC_MSG_RESULT(okay)
AC_MSG_RESULT([okay])
else
ok=no
AC_MSG_RESULT([does not match (want=$req_libgcrypt_api got=$tmp)])
AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp])
fi
fi
fi

10
configure vendored
View File

@ -2633,7 +2633,7 @@ ac_config_headers="$ac_config_headers config.h"
case "$target" in
*mingw*|*cygwin*)
WINSOCK_LIBS="-lws2_32"
WINSOCK_LIBS="-lws2_32 -lpthread"
;;
esac
@ -6220,8 +6220,8 @@ echo $ECHO_N "checking for LIBGCRYPT - version >= $min_libgcrypt_version... $ECH
fi
fi
if test $ok = yes; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
{ echo "$as_me:$LINENO: result: yes ($libgcrypt_config_version)" >&5
echo "${ECHO_T}yes ($libgcrypt_config_version)" >&6; }
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
@ -6239,8 +6239,8 @@ echo $ECHO_N "checking LIBGCRYPT API version... $ECHO_C" >&6; }
echo "${ECHO_T}okay" >&6; }
else
ok=no
{ echo "$as_me:$LINENO: result: does not match (want=$req_libgcrypt_api got=$tmp)" >&5
echo "${ECHO_T}does not match (want=$req_libgcrypt_api got=$tmp)" >&6; }
{ echo "$as_me:$LINENO: result: does not match. want=$req_libgcrypt_api got=$tmp" >&5
echo "${ECHO_T}does not match. want=$req_libgcrypt_api got=$tmp" >&6; }
fi
fi
fi

View File

@ -12,7 +12,7 @@ AC_CONFIG_HEADERS([config.h])
case "$target" in
*mingw*|*cygwin*)
WINSOCK_LIBS="-lws2_32"
WINSOCK_LIBS="-lws2_32 -lpthread"
AC_SUBST(WINSOCK_LIBS)
;;
esac

View File

@ -38,7 +38,7 @@
#include "PeerMessageUtil.h"
#include "DlAbortEx.h"
#include "Logger.h"
#include <arpa/inet.h>
#include "a2netcompat.h"
#include <cerrno>
#include <cstring>
#include <istream>

View File

@ -38,7 +38,7 @@
#include "DHTConstants.h"
#include "PeerMessageUtil.h"
#include "Logger.h"
#include <arpa/inet.h>
#include "a2netcompat.h"
#include <cerrno>
#include <cstring>
#include <ostream>

View File

@ -39,7 +39,7 @@
#include "SharedHandle.h"
#include "Command.h"
#include <deque>
#include <sys/select.h>
#include "a2netcompat.h"
namespace aria2 {

View File

@ -49,6 +49,8 @@
#include <stdlib.h> /* _fmode */
#include <fcntl.h> /* _O_BINARY */
namespace aria2 {
Platform::Platform() {
unsigned int _CRT_fmode = _O_BINARY;
WSADATA wsaData;
@ -62,4 +64,6 @@ Platform::~Platform() {
WSACleanup();
}
} // namespace aria2
#endif // HAVE_WINSOCK2_H

View File

@ -37,6 +37,8 @@
#include "common.h"
namespace aria2 {
#ifdef HAVE_WINSOCK2_H
class Platform {
@ -48,4 +50,6 @@ public:
#endif // HAVE_WINSOCK2_H
} // namespace aria2
#endif // _D_PLATFORM_H_

View File

@ -36,7 +36,7 @@
#define _D_SOCKET_CORE_H_
#include "common.h"
#include <sys/socket.h>
#include "a2netcompat.h"
#include <string>
#include <utility>

View File

@ -91,4 +91,25 @@
# include "gai_strerror.h"
#endif // HAVE_GAI_STRERROR
#ifdef __MINGW32__
# ifndef AI_PASSIVE
# define AI_PASSIVE 0x0020
# endif // AI_PASSIVE
# ifndef AI_NUMERICHOST
# define AI_NUMERICHOST 0x0008
# endif // AI_NUMERICHOST
# ifndef NI_NUMERICHOST
# define NI_NUMERICHOST 0x0008
# endif // NI_NUMERICHOST
# ifndef NI_NUMERICSERV
# define NI_NUMERICSERV 0x0020
# endif // NI_NUMERICSERV
# ifndef NI_MAXHOST
# define NI_MAXHOST 1025
# endif // NI_MAXHOST
# ifndef NI_MAXSERV
# define NI_MAXSERV 32
# endif // NI_MAXSERV
#endif // __MINGW32__
#endif // _D_A2NETCOMPAT_H_

View File

@ -35,6 +35,10 @@
#ifndef _D_COMMON_H_
#define _D_COMMON_H_
#ifdef __MINGW32__
# undef SIZE_MAX
#endif // __MINGW32__
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

View File

@ -33,6 +33,10 @@
extern "C" {
#endif /* __cplusplus */
#ifdef __MINGW32__
# undef SIZE_MAX
#endif // __MINGW32__
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H

View File

@ -33,6 +33,10 @@
extern "C" {
#endif /* __cplusplus */
#ifdef __MINGW32__
# undef SIZE_MAX
#endif // __MINGW32__
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H

View File

@ -36,6 +36,10 @@
#ifndef _D_GETTIMEOFDAY_H
#define _D_GETTIMEOFDAY_H 1
#ifdef __MINGW32__
# undef SIZE_MAX
#endif // __MINGW32__
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H

View File

@ -40,6 +40,10 @@
extern "C" {
#endif /* __cplusplus */
#ifdef __MINGW32__
# undef SIZE_MAX
#endif // __MINGW32__
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H

View File

@ -34,6 +34,10 @@
#ifndef _D_TIMEGM_H_
#define _D_TIMEGM_H_
#ifdef __MINGW32__
# undef SIZE_MAX
#endif // __MINGW32__
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif // HAVE_CONFIG_H