diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2012-08-10 21:51:51 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2012-08-10 21:51:51 +0200 |
commit | d63af18eaf4cad9a5d32199b17aed01df64eb663 (patch) | |
tree | 70c9e99f1e703924f2758652d6687def45ca07fe | |
parent | ba3db8e7a1d9b05687cb96e2d7b671c08f97c922 (diff) | |
download | crawler-d63af18eaf4cad9a5d32199b17aed01df64eb663.tar.gz crawler-d63af18eaf4cad9a5d32199b17aed01df64eb663.tar.bz2 |
started adapting googleurl on windows, icu intergration pending
-rwxr-xr-x[-rw-r--r--] | README.3rdPARTY | 4 | ||||
-rwxr-xr-x | googleurl/Makefile.W32 | 52 | ||||
-rwxr-xr-x[-rw-r--r--] | googleurl/base/string16.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | googleurl/url_canon_icu.cpp | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | googleurl/url_canon_internal.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | googleurl/url_canon_ip.cpp | 5 | ||||
-rwxr-xr-x | src/modules/urlnormalizer/Makefile.W32 | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | src/modules/urlnormalizer/googleurl/GoogleURLNormalizer.cpp | 2 | ||||
-rwxr-xr-x | src/modules/urlnormalizer/googleurl/Makefile.W32 | 46 |
9 files changed, 108 insertions, 4 deletions
diff --git a/README.3rdPARTY b/README.3rdPARTY index 7b42bee..b50eed5 100644..100755 --- a/README.3rdPARTY +++ b/README.3rdPARTY @@ -50,3 +50,7 @@ http://code.google.com/p/google-url/ - replaced deprecated strstream with sstream classes - unused function parameters (spec_len, context) - tamed some unhandled enums in switches +- changes for Windows: + - added pure nmake build system + - fixed trouble around UINT64 + diff --git a/googleurl/Makefile.W32 b/googleurl/Makefile.W32 new file mode 100755 index 0000000..b2af6be --- /dev/null +++ b/googleurl/Makefile.W32 @@ -0,0 +1,52 @@ +TOPDIR = .. + +SUBDIRS = + +!INCLUDE $(TOPDIR)\makefiles\nmake\platform.mk + +INCLUDE_CXXFLAGS = \ + /D_WIN32_WINNT=0x504 \ + /DNDEBUG /DWIN32 + +INCLUDE_DIRS = \ + /I. + +INCLUDE_LDFLAGS = \ + +INCLUDE_LIBS = \ + +CPP_OBJS = \ + url_canon_etc.obj \ + url_canon_filesystemurl.obj \ + url_canon_fileurl.obj \ + url_canon_host.obj \ + url_canon_icu.obj \ + url_canon_internal.obj \ + url_canon_ip.obj \ + url_canon_mailtourl.obj \ + url_canon_path.obj \ + url_canon_pathurl.obj \ + url_canon_query.obj \ + url_canon_relative.obj \ + url_canon_stdurl.obj \ + url_parse.obj \ + url_parse_file.obj \ + url_util.obj + +STATIC_LIB = \ + googleurl.lib + +all: $(CPP_OBJS) $(STATIC_LIB) + +!INCLUDE $(TOPDIR)\makefiles\nmake\sub.mk + +$(STATIC_LIB): $(CPP_OBJS) + $(LINK) /lib /nologo /out:$@ $(STATIC_LDFLAGS) $? + +local_all: + +local_clean: + +local_distclean: + +local_test: diff --git a/googleurl/base/string16.h b/googleurl/base/string16.h index ed77165..ed77165 100644..100755 --- a/googleurl/base/string16.h +++ b/googleurl/base/string16.h diff --git a/googleurl/url_canon_icu.cpp b/googleurl/url_canon_icu.cpp index 59eb96a..59eb96a 100644..100755 --- a/googleurl/url_canon_icu.cpp +++ b/googleurl/url_canon_icu.cpp diff --git a/googleurl/url_canon_internal.h b/googleurl/url_canon_internal.h index ac5774f..ac5774f 100644..100755 --- a/googleurl/url_canon_internal.h +++ b/googleurl/url_canon_internal.h diff --git a/googleurl/url_canon_ip.cpp b/googleurl/url_canon_ip.cpp index a149242..9acf77c 100644..100755 --- a/googleurl/url_canon_ip.cpp +++ b/googleurl/url_canon_ip.cpp @@ -37,6 +37,9 @@ #ifndef _WIN32 #include <inttypes.h> +#else +#define WIN32_MEAN_AND_LEAN +#include <windows.h> #endif namespace url_canon { @@ -179,7 +182,7 @@ CanonHostInfo::Family IPv4ComponentToNumber( // Use the 64-bit strtoi so we get a big number (no hex, decimal, or octal // number can overflow a 64-bit number in <= 16 characters). #ifdef WIN32 - uint64 num = _strtoui64(buf, NULL, BaseForType(base)); + UINT64 num = _strtoui64(buf, NULL, BaseForType(base)); #else uint64_t num = strtoull(buf, NULL, BaseForType(base)); #endif diff --git a/src/modules/urlnormalizer/Makefile.W32 b/src/modules/urlnormalizer/Makefile.W32 index e2b0c2d..4f92ea4 100755 --- a/src/modules/urlnormalizer/Makefile.W32 +++ b/src/modules/urlnormalizer/Makefile.W32 @@ -1,7 +1,6 @@ TOPDIR = ..\..\.. -SUBDIRS = simpleurl -#googleurl +SUBDIRS = simpleurl googleurl !INCLUDE $(TOPDIR)\makefiles\nmake\sub.mk diff --git a/src/modules/urlnormalizer/googleurl/GoogleURLNormalizer.cpp b/src/modules/urlnormalizer/googleurl/GoogleURLNormalizer.cpp index 4399a01..7e5edde 100644..100755 --- a/src/modules/urlnormalizer/googleurl/GoogleURLNormalizer.cpp +++ b/src/modules/urlnormalizer/googleurl/GoogleURLNormalizer.cpp @@ -1,6 +1,6 @@ #include "GoogleURLNormalizer.hpp" -#include <string> +//#include <string> #include "url_util.h" #include "url_canon_stdstring.h" diff --git a/src/modules/urlnormalizer/googleurl/Makefile.W32 b/src/modules/urlnormalizer/googleurl/Makefile.W32 new file mode 100755 index 0000000..f739b32 --- /dev/null +++ b/src/modules/urlnormalizer/googleurl/Makefile.W32 @@ -0,0 +1,46 @@ +TOPDIR = ..\..\..\.. + +SUBDIRS = + +!INCLUDE $(TOPDIR)\makefiles\nmake\platform.mk + +INCLUDE_CXXFLAGS = \ + /D_WIN32_WINNT=0x504 /DSHARED /DWIN32 + +INCLUDE_DIRS = \ + /I. \ + /I$(TOPDIR)\src \ + /I$(TOPDIR)/googleurl + +INCLUDE_LDFLAGS = \ + +INCLUDE_LIBS = \ + $(TOPDIR)\googleurl\googleurl.lib \ + $(TOPDIR)\src\crawlingwolf.lib + +DYNAMIC_MODULE = \ + mod_urlnormalizer_googleurl.dll + +STATIC_LIB = \ + googleurlnormalizer.lib + +CPP_OBJS = \ + GoogleURLNormalizer.obj + +!INCLUDE $(TOPDIR)\makefiles\nmake\sub.mk + +$(STATIC_LIB): $(CPP_OBJS) + $(LINK) /lib /nologo /out:$@ $(STATIC_LDFLAGS) $? + +$(DYNAMIC_MODULE): $(CPP_OBJS) + $(LINK) /dll /nologo /out:$@ $(LDFLAGS) $(LIBS) $? + +local_all: $(STATIC_LIB) $(DYNAMIC_MODULE) + +local_clean: + @-erase $(LOCAL_STATIC_LIB) 2>NUL + @-erase $(CPP_OBJS) 2>NUL + +local_distclean: + +local_test: |