Changeset 1771
- Timestamp:
- 26/07/2007 23:05:56 (5 years ago)
- Location:
- box/chris/merge
- Files:
-
- 5 edited
-
configure.ac (modified) (2 diffs)
-
docs/backup/win32_build_on_cygwin_using_mingw.txt (modified) (1 diff)
-
lib/common/BoxConfig-MSVC.h (modified) (1 diff)
-
lib/common/ExcludeList.cpp (modified) (9 diffs)
-
lib/common/ExcludeList.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/chris/merge/configure.ac
r1545 r1771 113 113 if test "$have_regex_h" = "yes"; then 114 114 AC_DEFINE([HAVE_REGEX_H], [1], [Define to 1 if regex.h is available]) 115 AC_SEARCH_LIBS([regcomp], ["pcreposix -lpcre"]) 115 else 116 AC_CHECK_HEADER([pcreposix.h], [have_pcreposix_h=yes]) 117 fi 118 119 if test "$have_pcreposix_h" = "yes"; then 120 AC_SEARCH_LIBS([regcomp], ["pcreposix -lpcre"],,[have_pcreposix_h=no_regcomp]) 121 fi 122 123 if test "$have_pcreposix_h" = "yes"; then 124 AC_DEFINE([HAVE_PCREPOSIX_H], [1], [Define to 1 if pcreposix.h is available]) 125 fi 126 127 if test "$have_regex_h" = "yes" -o "$have_pcreposix_h" = "yes"; then 128 have_regex_support=yes 129 AC_DEFINE([HAVE_REGEX_SUPPORT], [1], [Define to 1 if regular expressions are supported]) 130 else 131 have_regex_support=no 116 132 fi 117 133 … … 275 291 to the documentation for more information on each feature. 276 292 277 Regular expressions: $have_regex_ h293 Regular expressions: $have_regex_support 278 294 Large files: $have_large_file_support 279 295 Berkeley DB: $ax_path_bdb_ok -
box/chris/merge/docs/backup/win32_build_on_cygwin_using_mingw.txt
r456 r1771 36 36 ./configure 37 37 make winshared 38 cp .libs/pcreposix.dll /bin 39 cp .libs/pcreposix.dll.a /usr/i686-pc-mingw32/lib 40 cp pcreposix.h /usr/i686-pc-mingw32/include/regex.h 38 cp .libs/libpcre.a .libs/libpcreposix.a /usr/lib/mingw 39 cp pcreposix.h /usr/include/mingw 41 40 42 41 Now unpack the Box Backup sources, enter the source directory, 43 42 and configure like this: 44 43 45 export CXX="g++ -mno-cygwin" 46 export LD="g++ -mno-cygwin" 47 export CFLAGS="-mno-cygwin -mthreads" 48 export CXXFLAGS="-mno-cygwin -mthreads" 49 export LDFLAGS="-mno-cygwin -mthreads" 50 export LIBS="-lcrypto -lws2_32 -lgdi32" 51 (if you don't have a "configure" file, run "./bootstrap") 52 ./configure --target=i686-pc-mingw32 44 ./infrastructure/mingw/configure.sh 53 45 make 54 46 -
box/chris/merge/lib/common/BoxConfig-MSVC.h
r1759 r1771 179 179 /* #undef HAVE_REGEX_H */ 180 180 #define HAVE_PCREPOSIX_H 1 181 #define HAVE_REGEX_SUPPORT 1 181 182 182 183 /* Define to 1 if you have the `setproctitle' function. */ -
box/chris/merge/lib/common/ExcludeList.cpp
r1759 r1771 10 10 #include "Box.h" 11 11 12 #ifdef HAVE_PCREPOSIX_H 13 #include <pcreposix.h> 14 #define EXCLUDELIST_IMPLEMENTATION_REGEX_T_DEFINED 15 #elif defined HAVE_REGEX_H 16 #include <regex.h> 12 #ifdef HAVE_REGEX_SUPPORT 13 #ifdef HAVE_PCREPOSIX_H 14 #include <pcreposix.h> 15 #else 16 #include <regex.h> 17 #endif 17 18 #define EXCLUDELIST_IMPLEMENTATION_REGEX_T_DEFINED 18 19 #endif … … 50 51 ExcludeList::~ExcludeList() 51 52 { 52 #ifdef HAVE_REGEX_ H53 #ifdef HAVE_REGEX_SUPPORT 53 54 // free regex memory 54 55 while(mRegex.size() > 0) … … 168 169 void ExcludeList::AddRegexEntries(const std::string &rEntries) 169 170 { 170 #ifdef HAVE_REGEX_ H171 #ifdef HAVE_REGEX_SUPPORT 171 172 172 173 // Split strings up … … 253 254 254 255 // Check against regular expressions 255 #ifdef HAVE_REGEX_ H256 #ifdef HAVE_REGEX_SUPPORT 256 257 for(std::vector<regex_t *>::const_iterator i(mRegex.begin()); i != mRegex.end(); ++i) 257 258 { … … 309 310 mDefinite.clear(); 310 311 311 #ifdef HAVE_REGEX_ H312 #ifdef HAVE_REGEX_SUPPORT 312 313 // free regex memory 313 314 while(mRegex.size() > 0) … … 350 351 // 351 352 // 352 #ifdef HAVE_REGEX_ H353 #ifdef HAVE_REGEX_SUPPORT 353 354 rArchive.Read(iCount); 354 355 … … 387 388 } 388 389 } 389 #endif // HAVE_REGEX_ H390 #endif // HAVE_REGEX_SUPPORT 390 391 391 392 // … … 442 443 // 443 444 // 444 #ifdef HAVE_REGEX_ H445 #ifdef HAVE_REGEX_SUPPORT 445 446 // don't even try to save compiled regular expressions, 446 447 // use string copies instead. … … 455 456 rArchive.Write(*i); 456 457 } 457 #endif // HAVE_REGEX_ H458 #endif // HAVE_REGEX_SUPPORT 458 459 459 460 // -
box/chris/merge/lib/common/ExcludeList.h
r1089 r1771 51 51 unsigned int SizeOfDefiniteList() const {return mDefinite.size();} 52 52 unsigned int SizeOfRegexList() const 53 #ifdef HAVE_REGEX_ H53 #ifdef HAVE_REGEX_SUPPORT 54 54 {return mRegex.size();} 55 55 #else … … 59 59 private: 60 60 std::set<std::string> mDefinite; 61 #ifdef HAVE_REGEX_ H61 #ifdef HAVE_REGEX_SUPPORT 62 62 std::vector<regex_t *> mRegex; 63 63 std::vector<std::string> mRegexStr; // save original regular expression string-based source for Serialize
Note: See TracChangeset
for help on using the changeset viewer.
