Added configure check for various headers
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 14 Jan 2005 10:13:50 +0000 (10:13 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 14 Jan 2005 10:13:50 +0000 (10:13 +0000)
configure.in
src/yaz-pdu-assoc-thread.cpp
src/yaz-socket-manager.cpp

index 57e0826..c1e64b2 100644 (file)
@@ -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")
index 4a6b921..fd4373a 100644 (file)
@@ -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
 
 #if USE_THREADS
 
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #ifdef WIN32
 #include <process.h>
 #else
 #include <pthread.h>
-#include <unistd.h>
 #endif
 
+
 #include <errno.h>
 #include <yaz/log.h>
 #include <yaz/tcpip.h>
index 2cc87fa..4a75923 100644 (file)
@@ -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 <assert.h>
 #ifdef WIN32
 #include <winsock.h>
-#else
+#endif
+
+#if HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
+#if HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif
+#if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+
 #include <errno.h>
 #include <string.h>
+#include <assert.h>
 
 #include <yaz/log.h>
 #include <yaz++/socket-manager.h>