From 21650b252dff0a3942972c37421dc5d3c61502d5 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 30 Mar 2006 14:16:34 +0000 Subject: [PATCH] Windows version of yazproxy --- include/yazproxy/limit-connect.h | 4 ++-- src/msg-thread.cpp | 9 ++++++--- src/msg-thread.h | 13 +++++-------- src/yaz-proxy.cpp | 8 +++++--- win/makefile | 20 ++++++++++++-------- 5 files changed, 30 insertions(+), 24 deletions(-) diff --git a/include/yazproxy/limit-connect.h b/include/yazproxy/limit-connect.h index cfe8ae0..7efaf58 100644 --- a/include/yazproxy/limit-connect.h +++ b/include/yazproxy/limit-connect.h @@ -1,4 +1,4 @@ -/* $Id: limit-connect.h,v 1.1 2006-03-30 10:35:15 adam Exp $ +/* $Id: limit-connect.h,v 1.2 2006-03-30 14:16:34 adam Exp $ Copyright (c) 1998-2006, Index Data. This file is part of the yazproxy. @@ -25,7 +25,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include -class LimitConnect { +class YAZ_EXPORT LimitConnect { public: LimitConnect(); ~LimitConnect(); diff --git a/src/msg-thread.cpp b/src/msg-thread.cpp index e87231c..2c36163 100644 --- a/src/msg-thread.cpp +++ b/src/msg-thread.cpp @@ -1,4 +1,4 @@ -/* $Id: msg-thread.cpp,v 1.13 2006-03-30 13:29:23 adam Exp $ +/* $Id: msg-thread.cpp,v 1.14 2006-03-30 14:16:34 adam Exp $ Copyright (c) 1998-2006, Index Data. This file is part of the yazproxy. @@ -23,7 +23,10 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #endif +#if HAVE_UNISTD_H #include +#endif + #include #include @@ -34,7 +37,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA using namespace yazpp_1; -struct Msg_Thread::Private { +class Msg_Thread::Private { public: int m_no_threads; Msg_Thread_Queue m_input; @@ -150,7 +153,7 @@ Msg_Thread::~Msg_Thread() void Msg_Thread::socketNotify(int event) { -#if HAVE_POSIX_THREADS +#if YAZ_POSIX_THREADS if (event & SOCKET_OBSERVE_READ) { char buf[2]; diff --git a/src/msg-thread.h b/src/msg-thread.h index b7e4e57..a8f17ec 100644 --- a/src/msg-thread.h +++ b/src/msg-thread.h @@ -1,4 +1,4 @@ -/* $Id: msg-thread.h,v 1.10 2006-03-30 13:29:23 adam Exp $ +/* $Id: msg-thread.h,v 1.11 2006-03-30 14:16:34 adam Exp $ Copyright (c) 1998-2006, Index Data. This file is part of the yazproxy. @@ -19,27 +19,24 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include -#include - #include #include -class IMsg_Thread { +class YAZ_EXPORT IMsg_Thread { public: virtual IMsg_Thread *handle() = 0; virtual void result() = 0; virtual ~IMsg_Thread(); }; -class Msg_Thread_Queue_List { +class YAZ_EXPORT Msg_Thread_Queue_List { friend class Msg_Thread_Queue; private: IMsg_Thread *m_item; Msg_Thread_Queue_List *m_next; }; -class Msg_Thread_Queue { +class YAZ_EXPORT Msg_Thread_Queue { public: Msg_Thread_Queue(); void enqueue(IMsg_Thread *in); @@ -49,7 +46,7 @@ class Msg_Thread_Queue { Msg_Thread_Queue_List *m_list; }; -class Msg_Thread : public yazpp_1::ISocketObserver { +class YAZ_EXPORT Msg_Thread : public yazpp_1::ISocketObserver { class Private; public: Msg_Thread(yazpp_1::ISocketObservable *obs, int no_threads); diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index cdf931c..2d37c52 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -1,4 +1,4 @@ -/* $Id: yaz-proxy.cpp,v 1.46 2006-03-30 11:59:34 adam Exp $ +/* $Id: yaz-proxy.cpp,v 1.47 2006-03-30 14:16:34 adam Exp $ Copyright (c) 1998-2006, Index Data. This file is part of the yazproxy. @@ -59,10 +59,12 @@ using namespace yazpp_1; #define strncasecmp _strnicmp #endif -#define USE_AUTH_MSG 1 +#undef USE_AUTH_MSG +#define USE_AUTH_MSG 0 #if USE_AUTH_MSG -class Auth_Msg : public IMsg_Thread { +#error x +class YAZ_EXPORT Auth_Msg : public IMsg_Thread { public: int m_ret; IMsg_Thread *handle(); diff --git a/win/makefile b/win/makefile index 4d3b9d8..2156e44 100644 --- a/win/makefile +++ b/win/makefile @@ -1,6 +1,6 @@ -# Copyright (C) 1993-2004, Index Data ApS +# Copyright (C) 1993-2006, Index Data ApS # All rights reserved. -# $Id: makefile,v 1.4 2005-03-14 13:27:35 adam Exp $ +# $Id: makefile,v 1.5 2006-03-30 14:16:34 adam Exp $ ########################################################### ############### Parameters @@ -9,8 +9,8 @@ DEBUG=0 # 0 for release, 1 for debug # YAZ and YAZ++ -YAZ_DIR=c:\yaz -YAZPP_DIR=c:\yaz++ +YAZ_DIR=..\..\yaz +YAZPP_DIR=..\..\yazpp # iconv charcter conversion utility HAVE_ICONV=1 @@ -18,14 +18,14 @@ ICONV_DIR = c:\iconv-1.9.1.win32 # libxslt HAVE_LIBXSLT=1 -LIBXSLT_DIR=c:\libxslt-1.1.12.win32 +LIBXSLT_DIR=c:\libxslt-1.1.14.win32 # libxml2 (used by libxslt) HAVE_LIBXML2=1 -LIBXML2_DIR=c:\libxml2-2.6.15.win32 +LIBXML2_DIR=c:\libxml2-2.6.20.win32 # zlib compression (used by libxml2) -ZLIB_DIR = c:\zlib-1.2.1.win32 +ZLIB_DIR = c:\zlib-1.2.3.win32 # get WIN32 binaries for libxslt, libxml, iconv, zlib from here: # http://www.zlatkovic.com/libxml.en.html @@ -102,7 +102,7 @@ ICONV_LIB= \ iconv: $(BINDIR)\iconv.dll $(BINDIR)\iconv.dll: - copy "$(ICONV_DIR)\lib\iconv.dll" $(BINDIR) + copy "$(ICONV_DIR)\bin\iconv.dll" $(BINDIR) !else ICONV_DEF= \ /D HAVE_ICONV_H=0 @@ -238,6 +238,10 @@ YAZPROXY_DLL_OBJS = \ "$(OBJDIR)\yaz-proxy.obj" \ "$(OBJDIR)\yaz-proxy-config.obj" \ "$(OBJDIR)\yaz-usemarcon.obj" \ + "$(OBJDIR)\msg-thread.obj" \ + "$(OBJDIR)\charset-converter.obj" \ + "$(OBJDIR)\limit-connect.obj" \ + "$(OBJDIR)\modules.obj" \ "$(OBJDIR)\yaz-bw.obj" ########################################################### -- 1.7.10.4