From d58ea1d3d51d6dbb10f19d7b34609ade1eedcf46 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 14 Jan 2005 10:13:50 +0000 Subject: [PATCH] Added configure check for various headers --- configure.in | 1 + src/yaz-pdu-assoc-thread.cpp | 8 ++++++-- src/yaz-socket-manager.cpp | 15 +++++++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index 57e0826..c1e64b2 100644 --- a/configure.in +++ b/configure.in @@ -13,6 +13,7 @@ if test -z "$YAZLIB"; then AC_MSG_ERROR([YAZ development libraries missing]) fi YAZ_DOC +AC_CHECK_HEADERS(unistd.h sys/stat.h sys/time.h sys/types.h) AC_ARG_ENABLE(zoom,[ --disable-zoom disable ZOOM (for old C++ compilers)],[enable_zoom=$enableval],[enable_zoom=yes]) AM_CONDITIONAL(ZOOM, test $enable_zoom = "yes") diff --git a/src/yaz-pdu-assoc-thread.cpp b/src/yaz-pdu-assoc-thread.cpp index 4a6b921..fd4373a 100644 --- a/src/yaz-pdu-assoc-thread.cpp +++ b/src/yaz-pdu-assoc-thread.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2004, Index Data. * See the file LICENSE for details. * - * $Id: yaz-pdu-assoc-thread.cpp,v 1.8 2004-12-13 20:50:54 adam Exp $ + * $Id: yaz-pdu-assoc-thread.cpp,v 1.9 2005-01-14 10:13:50 adam Exp $ */ #ifdef WIN32 @@ -15,13 +15,17 @@ #if USE_THREADS +#if HAVE_UNISTD_H +#include +#endif + #ifdef WIN32 #include #else #include -#include #endif + #include #include #include diff --git a/src/yaz-socket-manager.cpp b/src/yaz-socket-manager.cpp index 2cc87fa..4a75923 100644 --- a/src/yaz-socket-manager.cpp +++ b/src/yaz-socket-manager.cpp @@ -1,19 +1,26 @@ /* - * Copyright (c) 1998-2004, Index Data. + * Copyright (c) 1998-2005, Index Data. * See the file LICENSE for details. * - * $Id: yaz-socket-manager.cpp,v 1.30 2004-12-13 20:50:54 adam Exp $ + * $Id: yaz-socket-manager.cpp,v 1.31 2005-01-14 10:13:50 adam Exp $ */ -#include #ifdef WIN32 #include -#else +#endif + +#if HAVE_SYS_TIME_H #include +#endif +#if HAVE_SYS_TYPES_H #include +#endif +#if HAVE_UNISTD_H #include #endif + #include #include +#include #include #include -- 1.7.10.4