From: Adam Dickmeiss Date: Sun, 20 Apr 2008 18:16:45 +0000 (+0200) Subject: Added check for Unix specific headers and harmonize with Win32 build. X-Git-Tag: PAZPAR2.1.0.8~8 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=18701a2fcad5171b03a76ceda18702831eb90850;p=pazpar2-moved-to-github.git Added check for Unix specific headers and harmonize with Win32 build. --- diff --git a/configure.ac b/configure.ac index 9c6d987..0bb54cd 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,7 @@ if test -z "$YAZLIB"; then fi YAZ_DOC +AC_CHECK_HEADERS([sys/time.h sys/socket.h unistd.h netinet/in.h netdb.h arpa/inet.h]) AC_CHECK_FUNCS([getaddrinfo]) AC_CHECK_ICU([3.6],[ICU_CPPFLAGS="$ICU_CPPFLAGS -D HAVE_ICU=1"]) AC_CONFIG_FILES([ diff --git a/src/Makefile.am b/src/Makefile.am index 2148f6d..9195380 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,7 +32,8 @@ libpazpar2_a_SOURCES = pazpar2_config.c pazpar2_config.h eventl.c eventl.h \ util.c util.h zeerex.c zeerex.h database.c database.h \ settings.h settings.c sel_thread.c sel_thread.h getaddrinfo.c \ charsets.c charsets.h \ - client.c client.h connection.c connection.h host.h parameters.h + client.c client.h connection.c connection.h host.h parameters.h \ + dirent.c direntz.h pazpar2_SOURCES = pazpar2.c pazpar2_LDADD = libpazpar2.a $(YAZLIB) $(ICU_LIBS) diff --git a/src/client.c b/src/client.c index 87ef522..076b5e5 100644 --- a/src/client.c +++ b/src/client.c @@ -21,6 +21,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \brief Z39.50 client */ +#if HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -54,10 +58,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#if HAVE_CONFIG_H -#include -#endif - #define USE_TIMING 0 #if USE_TIMING #include diff --git a/src/connection.c b/src/connection.c index 9ea3275..9a152b0 100644 --- a/src/connection.c +++ b/src/connection.c @@ -21,6 +21,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \brief Z39.50 connection (low-level client) */ +#if HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -45,10 +49,6 @@ typedef int socklen_t; #include #include -#if HAVE_CONFIG_H -#include -#endif - #include #include #include diff --git a/src/database.c b/src/database.c index 347c26b..9069791 100644 --- a/src/database.c +++ b/src/database.c @@ -17,6 +17,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/src/dirent.c b/src/dirent.c index a0a8a73..6daba7e 100644 --- a/src/dirent.c +++ b/src/dirent.c @@ -1,15 +1,12 @@ -/* $Id: dirent.c,v 1.10 2007-01-15 15:10:26 adam Exp $ - Copyright (C) 1995-2007 - Index Data ApS +/* This file is part of Pazpar2. + Copyright (C) 2006-2008 Index Data -This file is part of the Zebra server. - -Zebra is free software; you can redistribute it and/or modify it under +Pazpar2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. -Zebra is distributed in the hope that it will be useful, but WITHOUT ANY +Pazpar2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -21,6 +18,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/* almost identical to dirent.c of Zebra. */ + +#if HAVE_CONFIG_H +#include +#endif #include #include diff --git a/src/eventl.c b/src/eventl.c index 29a621c..518b69e 100644 --- a/src/eventl.c +++ b/src/eventl.c @@ -28,13 +28,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Based on revision YAZ' server/eventl.c 1.29. */ -#include -#include - #if HAVE_CONFIG_H #include #endif +#include +#include + #ifdef WIN32 #include #else diff --git a/src/http.c b/src/http.c index b1d7b43..c68318a 100644 --- a/src/http.c +++ b/src/http.c @@ -17,6 +17,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif + #include #ifdef WIN32 #include @@ -28,9 +32,6 @@ typedef int socklen_t; #endif #include -#if HAVE_SYS_UIO_H -#include -#endif #include #if HAVE_UNISTD_H @@ -49,10 +50,6 @@ typedef int socklen_t; #include #include -#if HAVE_CONFIG_H -#include -#endif - #if HAVE_NETINET_IN_H #include #endif diff --git a/src/http_command.c b/src/http_command.c index 0de007b..bb69bee 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -17,15 +17,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -/* - * $Id: http_command.c,v 1.66 2007-10-28 18:55:26 adam Exp $ - */ - +#if HAVE_CONFIG_H +#include +#endif #include #include -#if HAVE_SYS_UIO_H -#include -#endif #if HAVE_UNISTD_H #include #endif @@ -36,10 +32,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #endif #include -#if HAVE_CONFIG_H -#include -#endif - #include #include "util.h" diff --git a/src/logic.c b/src/logic.c index 8abdcae..3d4de11 100644 --- a/src/logic.c +++ b/src/logic.c @@ -21,6 +21,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \brief high-level logic; mostly user sessions and settings */ +#if HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -54,10 +58,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#if HAVE_CONFIG_H -#include -#endif - #define USE_TIMING 0 #if USE_TIMING #include diff --git a/src/normalize7bit.c b/src/normalize7bit.c index 7642cd7..f400d93 100644 --- a/src/normalize7bit.c +++ b/src/normalize7bit.c @@ -21,14 +21,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \brief char and string normalization for 7bit ascii only */ -#include -#include -#include - #if HAVE_CONFIG_H #include #endif +#include +#include +#include + #include "normalize7bit.h" diff --git a/src/pazpar2.c b/src/pazpar2.c index a4be363..dbcf4b8 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #endif - #include #include diff --git a/src/pazpar2_config.c b/src/pazpar2_config.c index 1f1423a..11cc316 100644 --- a/src/pazpar2_config.c +++ b/src/pazpar2_config.c @@ -17,7 +17,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id: config.c,v 1.42 2007-10-31 05:29:08 quinn Exp $ */ +#if HAVE_CONFIG_H +#include +#endif #include @@ -27,10 +29,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#if HAVE_CONFIG_H -#include -#endif - #include #include #include diff --git a/src/record.c b/src/record.c index 5220abf..b1446ce 100644 --- a/src/record.c +++ b/src/record.c @@ -17,9 +17,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id: record.c,v 1.10 2007-06-13 21:29:04 adam Exp $ */ - - #include #include diff --git a/src/relevance.c b/src/relevance.c index b35adce..86ba9ec 100644 --- a/src/relevance.c +++ b/src/relevance.c @@ -17,14 +17,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include -#include - #if HAVE_CONFIG_H #include #endif +#include +#include +#include + #include "relevance.h" #include "pazpar2.h" diff --git a/src/settings.c b/src/settings.c index 8dbb687..bea5da7 100644 --- a/src/settings.c +++ b/src/settings.c @@ -17,12 +17,16 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - // This module implements a generic system of settings // (attribute-value) that can be associated with search targets. The // system supports both default values, per-target overrides, and // per-user settings. +#if HAVE_CONFIG_H +#include +#endif + + #include #include #include diff --git a/src/termlists.c b/src/termlists.c index ad0529c..00247f2 100644 --- a/src/termlists.c +++ b/src/termlists.c @@ -17,15 +17,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif + #include #include #include #include -#if HAVE_CONFIG_H -#include -#endif - #include "termlists.h" // Discussion: diff --git a/src/util.c b/src/util.c index 7944d97..353130f 100644 --- a/src/util.c +++ b/src/util.c @@ -16,12 +16,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #if HAVE_CONFIG_H #include #endif +#include #include void die(char *string, char *add)