* Copyright (c) 2005, Index Data.
* See the file LICENSE for details.
*
- * $Id: t-server.cpp,v 1.8 2006-03-29 13:33:47 adam Exp $
+ * $Id: t-server.cpp,v 1.9 2006-03-30 14:19:19 adam Exp $
*/
#include <stdlib.h>
#include <yazpp/gduqueue.h>
#include <yazpp/socket-manager.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
using namespace yazpp_1;
class MyServer;
ODR_MASK_SET(apdu->u.initResponse->options, Z_Options_present);
break;
case Z_APDU_searchRequest:
+#if HAVE_UNISTD_H
sleep(5);
+#endif
apdu = zget_APDU(odr, Z_APDU_searchResponse);
break;
case Z_APDU_triggerResourceControlRequest:
-/* $Id: tstthreads.cpp,v 1.10 2006-03-30 10:32:16 adam Exp $
+/* $Id: tstthreads.cpp,v 1.11 2006-03-30 14:19:19 adam Exp $
Copyright (c) 1998-2006, Index Data.
This file is part of the yazproxy.
#include <yaz/log.h>
#include "msg-thread.h"
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
using namespace yazpp_1;
class My_Msg : public IMsg_Thread {
res->m_val = m_val;
printf("My_Msg::handle val=%d sleep=%d\n", m_val, sl);
+#if HAVE_UNISTD_H
sleep(sl);
+#endif
return res;
}
have_yaz_version=`echo "$YAZVERSION" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`
req_yaz_version=`echo "$2" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`
if test "$have_yaz_version" -lt "$req_yaz_version"; then
- AC_MSG_ERROR([$YAZVERSION. Requires $2 or later])
+ AC_MSG_ERROR([$YAZVERSION. Requires YAZ $2 or later])
fi
if test "$req_yaz_version" -gt "2000028"; then
YAZINC="$YAZINC -DYAZ_USE_NEW_LOG=1"
have_yaz_version=`echo "$YAZPPVERSION" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`
req_yaz_version=`echo "$2" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`
if test "$have_yaz_version" -lt "$req_yaz_version"; then
- AC_MSG_ERROR([$YAZPPVERSION. Requires $2 or later])
+ AC_MSG_ERROR([$YAZPPVERSION. Requires YAZ++ $2 or later])
fi
fi
fi