Ticket #303: patch24.patch
File patch24.patch, 12.2 KB (added by , 16 years ago) |
---|
-
xapian-core/backends/chert/chert_version.cc
38 38 #include <cstring> // For memcmp() and memcpy(). 39 39 #include <string> 40 40 41 #include <uuid/uuid.h> 41 #ifdef __WIN32__ 42 # include "common/msvc_uuid.h" 43 #else 44 # include <uuid/uuid.h> 45 #endif 42 46 43 47 using namespace std; 44 48 -
xapian-core/backends/chert/chert_version.h
24 24 #include <cstring> 25 25 #include <string> 26 26 27 #include <uuid/uuid.h> 27 #ifdef __WIN32__ 28 # include "common/msvc_uuid.h" 29 #else 30 # include <uuid/uuid.h> 31 #endif 28 32 29 33 /** The ChertVersion class manages the "iamchert" file. 30 34 * -
xapian-core/backends/flint/flint_version.cc
37 37 #include <cstring> // For memcmp() and memcpy(). 38 38 #include <string> 39 39 40 #include <uuid/uuid.h> 40 #ifdef __WIN32__ 41 # include "common/msvc_uuid.h" 42 #else 43 # include <uuid/uuid.h> 44 #endif 41 45 42 46 using std::string; 43 47 -
xapian-core/backends/flint/flint_version.h
24 24 #include <cstring> 25 25 #include <string> 26 26 27 #include <uuid/uuid.h> 27 #ifdef __WIN32__ 28 # include "common/msvc_uuid.h" 29 #else 30 # include <uuid/uuid.h> 31 #endif 28 32 29 33 /** The FlintVersion class manages the "iamflint" file. 30 34 * -
xapian-core/common/msvc_uuid.cc
1 /* msvc_uuid.cc: Provides UUID functions with Posix semantics 2 * 3 * Copyright (C) 2008 Lemur Consulting Ltd 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #include <config.h> 21 22 #ifdef __WIN32__ /* Ignore the whole file except for __WIN32__ */ 23 24 #include "safewindows.h" 25 #include "msvc_uuid.h" 26 27 void uuid_generate(uuid_t uu){ 28 UUID uuid; 29 if(UuidCreate(&uuid) != RPC_S_OK) return; 30 memcpy(&uu,&uuid,16); 31 } 32 33 int uuid_parse(const char * in, uuid_t uu){ 34 UUID uuid; 35 if(UuidFromString((unsigned char*)in,&uuid) != RPC_S_OK) return -1; 36 memcpy(&uu,&uuid,16); 37 return 0; 38 } 39 40 void uuid_unparse_lower(const uuid_t uu, char * out){ 41 UUID uuid; 42 char *uuidstr; 43 memcpy(&uuid,&uu,16); 44 if(UuidToString(&uuid,(unsigned char**)&uuidstr) != RPC_S_OK) return; 45 int uuidlen = strlen( uuidstr ); 46 strncpy( out, strlwr(uuidstr), uuidlen ); 47 RpcStringFree( (unsigned char**)&uuidstr ); 48 } 49 50 void uuid_clear(uuid_t uu){ 51 memset(&uu,0x00,16); 52 } 53 54 int uuid_is_null(uuid_t uu){ 55 int i=0; 56 while(i<16) if (uu[i++]) return 0; 57 return 1; 58 } 59 60 61 #endif 62 No newline at end of file -
xapian-core/common/msvc_uuid.h
1 /* msvc_uuid.h: Provides UUID functions with Posix semantics 2 * 3 * Copyright 2008 Lemur Consulting Ltd 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License as 7 * published by the Free Software Foundation; either version 2 of the 8 * License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 18 * USA 19 */ 20 21 #ifndef XAPIAN_INCLUDED_MSVC_UUID_H 22 #define XAPIAN_INCLUDED_MSVC_UUID_H 23 24 #ifdef __WIN32__ /* Ignore the whole file except for __WIN32__ */ 25 26 #include "safewindows.h" 27 #include <rpc.h> 28 29 // unfortunately Windows defines this as GUID, so let's redefine to match the Unix definition 30 #undef uuid_t 31 typedef unsigned char uuid_t [16]; 32 33 void uuid_generate(uuid_t uu); 34 35 int uuid_parse(const char * in, uuid_t uu); 36 37 void uuid_unparse_lower(const uuid_t uu, char * out); 38 39 void uuid_clear(uuid_t uu); 40 41 int uuid_is_null(uuid_t uu); 42 43 #endif /* __WIN32__*/ 44 #endif /* XAPIAN_INCLUDED_MSVC_POSIX_UUID_H */ -
xapian-maintainer-tools/win32msvc/ChangeLog
1 Mon Oct 13 13:42:00 GMT 2008 Charlie Hull <charlie@lemurconsulting.com> 2 3 * msvc_uuid.h, msvc_uuid.cc, flint_version.cc, flint_version.h, chert_version.cc, 4 chert_version.h: add new Windows version of UUID functions 5 * config.mak: remove Quartz library 6 7 1 8 Mon Sep 08 09:59:17 GMT 2008 Richard Boulton <richard@lemurconsulting.com> 2 9 3 10 * genversion.pl: Update to match new configure.ac (cope with the []'s -
xapian-maintainer-tools/win32msvc/config.h.win32
178 178 /* Undefine rare() as we don't have this in MSVC (See the section "Branch Prediction Hints" in xapian-core/HACKING) */ 179 179 #define rare 180 180 181 /* Undefine usual() as we don't have this in MSVC (See the section "Branch Prediction Hints" in xapian-core/HACKING) */ 182 #define usual(COND) (COND) 183 184 181 185 /* Define sizes of types as this isn't done by Windows */ 182 186 183 187 /* The number of bytes in a int. */ -
xapian-maintainer-tools/win32msvc/config.mak
138 138 LIB32_FLAGS=-nologo 139 139 LINK32=link.exe 140 140 LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ 141 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib \141 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib rpcrt4.lib\ 142 142 wsock32.lib Ws2_32.lib odbccp32.lib -subsystem:console -debug -nologo \ 143 143 "$(ZLIB_LIB_DIR)\zdll.lib" 144 144 … … 180 180 "$(OUTLIBDIR)\libbackend.lib" \ 181 181 "$(OUTLIBDIR)\libexpand.lib" \ 182 182 "$(OUTLIBDIR)\libflint.lib" \ 183 "$(OUTLIBDIR)\lib quartz.lib" \183 "$(OUTLIBDIR)\libchert.lib" \ 184 184 "$(OUTLIBDIR)\libinmemory.lib" \ 185 185 "$(OUTLIBDIR)\libmulti.lib" \ 186 186 "$(OUTLIBDIR)\libmatcher.lib" \ -
xapian-maintainer-tools/win32msvc/win32_backends.mak
18 18 "$(OUTDIR)\libchert.lib" \ 19 19 $(NULL) 20 20 21 OBJS= $(INTDIR)\database.obj $(INTDIR)\dbfactory_remote.obj $(INTDIR)\alltermslist.obj $(INTDIR)\contiguousalldocspostlist.obj 22 SRCS= $(INTDIR)\database.cc $(INTDIR)\dbfactory_remote.cc $(INTDIR)\alltermslist.cc $(INTDIR)\contiguousalldocspostlist.cc 21 OBJS= $(INTDIR)\database.obj \ 22 $(INTDIR)\dbfactory.obj \ 23 $(INTDIR)\dbfactory_remote.obj \ 24 $(INTDIR)\alltermslist.obj \ 25 $(INTDIR)\valuelist.obj \ 26 $(INTDIR)\contiguousalldocspostlist.obj 27 28 SRCS= $(INTDIR)\database.cc \ 29 $(INTDIR)\dbfactory.cc \ 30 $(INTDIR)\dbfactory_remote.cc \ 31 $(INTDIR)\alltermslist.cc \ 32 $(INTDIR)\valuelist.cc \ 33 $(INTDIR)\contiguousalldocspostlist.cc 34 35 23 36 24 37 ALL : $(DEPLIBS) "$(OUTDIR)\libbackend.lib" 25 38 -
xapian-maintainer-tools/win32msvc/win32_backends_chert.mak
36 36 $(INTDIR)\chert_termlist.obj\ 37 37 $(INTDIR)\chert_termlisttable.obj\ 38 38 $(INTDIR)\chert_values.obj\ 39 $(INTDIR)\chert_valuelist.obj\ 39 40 $(INTDIR)\chert_version.obj 40 41 41 42 SRCS= \ … … 60 61 $(INTDIR)\chert_termlist.cc\ 61 62 $(INTDIR)\chert_termlisttable.cc\ 62 63 $(INTDIR)\chert_values.cc\ 64 $(INTDIR)\chert_valuelist.cc\ 63 65 $(INTDIR)\chert_version.cc\ 64 66 $(INTDIR)\chert_check.cc 65 67 -
xapian-maintainer-tools/win32msvc/win32_backends_remote.mak
15 15 16 16 OBJS= \ 17 17 $(INTDIR)\remote-database.obj \ 18 $(INTDIR)\ net_document.obj \18 $(INTDIR)\remote-document.obj \ 19 19 $(INTDIR)\net_termlist.obj \ 20 20 $(INTDIR)\net_postlist.obj \ 21 21 22 22 SRCS= \ 23 23 $(INTDIR)\remote-database.cc \ 24 $(INTDIR)\ net_document.cc \24 $(INTDIR)\remote-document.cc \ 25 25 $(INTDIR)\net_termlist.cc \ 26 26 $(INTDIR)\net_postlist.cc \ 27 27 -
xapian-maintainer-tools/win32msvc/win32_common.mak
19 19 $(INTDIR)\serialise-double.obj \ 20 20 $(INTDIR)\msvc_dirent.obj \ 21 21 $(INTDIR)\msvc_posix_wrapper.obj \ 22 $(INTDIR)\msvc_uuid.obj \ 22 23 $(INTDIR)\socket_utils.obj \ 23 24 $(INTDIR)\stringutils.obj \ 24 25 $(INTDIR)\safe.obj \ … … 32 33 $(INTDIR)\serialise-double.cc \ 33 34 $(INTDIR)\msvc_dirent.cc \ 34 35 $(INTDIR)\msvc_posix_wrapper.cc \ 36 $(INTDIR)\msvc_uuid.cc \ 35 37 $(INTDIR)\socket_utils.cc \ 36 38 $(INTDIR)\stringutils.cc \ 37 39 $(INTDIR)\safe.cc \ -
xapian-maintainer-tools/win32msvc/win32_perftest.mak
58 58 CPP_OBJS=..\..\win32\$(XAPIAN_DEBUG_OR_RELEASE) 59 59 CPP_SBRS=. 60 60 61 ALL_LINK32_FLAGS=$(LINK32_FLAGS) $(XAPIAN_LIBS) "$(OUTLIBDIR)\libtest.lib" 61 ALL_LINK32_FLAGS=$(LINK32_FLAGS) $(XAPIAN_LIBS) "$(OUTLIBDIR)\libtest.lib" 62 62 63 63 # executables 64 $(BUILD_ALL) : perftest_all.h $(OUTDIR) $(DEF_FILE) $(OBJS) $(XAPIAN_LIBS) 64 $(BUILD_ALL) : perftest_all.h $(OUTDIR) $(DEF_FILE) $(OBJS) $(XAPIAN_LIBS) "$(OUTLIBDIR)\libtest.lib" 65 65 $(LINK32) @<< 66 66 $(ALL_LINK32_FLAGS) /out:"$(BUILD_ALL)" $(DEF_FLAGS) $(OBJS) 67 67 <<