From 9c534932b8e481369dd9117f5843569ebbed8550 Mon Sep 17 00:00:00 2001 From: Caolan McNamara Date: Mar 04 2009 13:16:29 +0000 Subject: include stdio.h for rename, fix bare #elif, EOF -> -1 for getopt --- diff --git a/xapian-core-1.0.9-includes.patch b/xapian-core-1.0.9-includes.patch new file mode 100644 index 0000000..00457e2 --- /dev/null +++ b/xapian-core-1.0.9-includes.patch @@ -0,0 +1,131 @@ +diff -ru xapian-core-1.0.9.orig/backends/flint/flint_version.cc xapian-core-1.0.9/backends/flint/flint_version.cc +--- xapian-core-1.0.9.orig/backends/flint/flint_version.cc 2009-03-04 12:06:14.000000000 +0000 ++++ xapian-core-1.0.9/backends/flint/flint_version.cc 2009-03-04 12:06:34.000000000 +0000 +@@ -36,6 +36,7 @@ + #include + + #include // for memcmp ++#include // for rename + + using std::string; + +diff -ru xapian-core-1.0.9.orig/bin/quartzcompact.cc xapian-core-1.0.9/bin/quartzcompact.cc +--- xapian-core-1.0.9.orig/bin/quartzcompact.cc 2009-03-04 12:06:14.000000000 +0000 ++++ xapian-core-1.0.9/bin/quartzcompact.cc 2009-03-04 12:48:51.000000000 +0000 +@@ -222,7 +222,7 @@ + size_t block_size = 8192; + + int c; +- while ((c = gnu_getopt_long(argc, argv, "b:nFhv", long_opts, 0)) != EOF) { ++ while ((c = gnu_getopt_long(argc, argv, "b:nFhv", long_opts, 0)) != -1) { + switch (c) { + case 'b': { + char *p; +diff -ru xapian-core-1.0.9.orig/bin/quartzdump.cc xapian-core-1.0.9/bin/quartzdump.cc +--- xapian-core-1.0.9.orig/bin/quartzdump.cc 2009-03-04 12:06:14.000000000 +0000 ++++ xapian-core-1.0.9/bin/quartzdump.cc 2009-03-04 12:48:54.000000000 +0000 +@@ -91,7 +91,7 @@ + }; + + int c; +- while ((c = gnu_getopt_long(argc, argv, "r:s:e:", long_opts, 0)) != EOF) { ++ while ((c = gnu_getopt_long(argc, argv, "r:s:e:", long_opts, 0)) != -1) { + switch (c) { + case 'r': + revnum = atoi(optarg); +diff -ru xapian-core-1.0.9.orig/bin/xapian-compact.cc xapian-core-1.0.9/bin/xapian-compact.cc +--- xapian-core-1.0.9.orig/bin/xapian-compact.cc 2009-03-04 12:06:14.000000000 +0000 ++++ xapian-core-1.0.9/bin/xapian-compact.cc 2009-03-04 12:49:00.000000000 +0000 +@@ -748,7 +748,7 @@ + bool renumber = true; + + int c; +- while ((c = gnu_getopt_long(argc, argv, "b:nFm", long_opts, 0)) != EOF) { ++ while ((c = gnu_getopt_long(argc, argv, "b:nFm", long_opts, 0)) != -1) { + switch (c) { + case 'b': { + char *p; +diff -ru xapian-core-1.0.9.orig/bin/xapian-inspect.cc xapian-core-1.0.9/bin/xapian-inspect.cc +--- xapian-core-1.0.9.orig/bin/xapian-inspect.cc 2009-03-04 12:06:14.000000000 +0000 ++++ xapian-core-1.0.9/bin/xapian-inspect.cc 2009-03-04 12:49:03.000000000 +0000 +@@ -94,7 +94,7 @@ + }; + + int c; +- while ((c = gnu_getopt_long(argc, argv, "", long_opts, 0)) != EOF) { ++ while ((c = gnu_getopt_long(argc, argv, "", long_opts, 0)) != -1) { + switch (c) { + case OPT_HELP: + cout << PROG_NAME" - "PROG_DESC"\n\n"; +diff -ru xapian-core-1.0.9.orig/bin/xapian-progsrv.cc xapian-core-1.0.9/bin/xapian-progsrv.cc +--- xapian-core-1.0.9.orig/bin/xapian-progsrv.cc 2009-03-04 12:06:14.000000000 +0000 ++++ xapian-core-1.0.9/bin/xapian-progsrv.cc 2009-03-04 12:49:07.000000000 +0000 +@@ -60,7 +60,7 @@ + bool syntax_error = false; + + int c; +- while ((c = gnu_getopt_long(argc, argv, "t:", opts, NULL)) != EOF) { ++ while ((c = gnu_getopt_long(argc, argv, "t:", opts, NULL)) != -1) { + switch (c) { + case OPT_HELP: + cout << PROG_NAME" - "PROG_DESC"\n\n"; +diff -ru xapian-core-1.0.9.orig/bin/xapian-tcpsrv.cc xapian-core-1.0.9/bin/xapian-tcpsrv.cc +--- xapian-core-1.0.9.orig/bin/xapian-tcpsrv.cc 2009-03-04 12:06:14.000000000 +0000 ++++ xapian-core-1.0.9/bin/xapian-tcpsrv.cc 2009-03-04 12:49:12.000000000 +0000 +@@ -95,7 +95,7 @@ + bool syntax_error = false; + + int c; +- while ((c = gnu_getopt_long(argc, argv, "I:p:a:i:t:oq", opts, NULL)) != EOF) { ++ while ((c = gnu_getopt_long(argc, argv, "I:p:a:i:t:oq", opts, NULL)) != -1) { + switch (c) { + case OPT_HELP: + cout << PROG_NAME" - "PROG_DESC"\n\n"; +diff -ru xapian-core-1.0.9.orig/common/serialise-double.cc xapian-core-1.0.9/common/serialise-double.cc +--- xapian-core-1.0.9.orig/common/serialise-double.cc 2009-03-04 12:06:14.000000000 +0000 ++++ xapian-core-1.0.9/common/serialise-double.cc 2009-03-04 12:21:40.000000000 +0000 +@@ -56,7 +56,7 @@ + # define MAX_MANTISSA_BYTES ((DBL_MANT_DIG + 1 + 1) / 2) + # define MAX_EXP ((DBL_MAX_EXP + 1) / 2) + # define MAX_MANTISSA (1 << ((DBL_MAX_EXP & 1) * 4)) +-#elif ++#else + # error FLT_RADIX is a value not currently handled (not 2 or 16) + // # define MAX_MANTISSA_BYTES (sizeof(double) + 1) + #endif +diff -ru xapian-core-1.0.9.orig/examples/delve.cc xapian-core-1.0.9/examples/delve.cc +--- xapian-core-1.0.9.orig/examples/delve.cc 2009-03-04 12:06:14.000000000 +0000 ++++ xapian-core-1.0.9/examples/delve.cc 2009-03-04 13:06:01.000000000 +0000 +@@ -172,7 +172,7 @@ + bool valno_set = false; + + int c; +- while ((c = gnu_getopt(argc, argv, "r:t:s:1vkV::d")) != EOF) { ++ while ((c = gnu_getopt(argc, argv, "r:t:s:1vkV::d")) != -1) { + switch (c) { + case 'r': + recnos.push_back(atoi(optarg)); +diff -ru xapian-core-1.0.9.orig/examples/quest.cc xapian-core-1.0.9/examples/quest.cc +--- xapian-core-1.0.9.orig/examples/quest.cc 2009-03-04 12:06:14.000000000 +0000 ++++ xapian-core-1.0.9/examples/quest.cc 2009-03-04 13:06:11.000000000 +0000 +@@ -80,7 +80,7 @@ + Xapian::Database db; + + int c; +- while ((c = gnu_getopt_long(argc, argv, "hvm:d:s:", long_opts, 0)) != EOF) ++ while ((c = gnu_getopt_long(argc, argv, "hvm:d:s:", long_opts, 0)) != -1) + { + switch (c) { + case 'm': +diff -ru xapian-core-1.0.9.orig/tests/harness/testsuite.cc xapian-core-1.0.9/tests/harness/testsuite.cc +--- xapian-core-1.0.9.orig/tests/harness/testsuite.cc 2009-03-04 12:06:14.000000000 +0000 ++++ xapian-core-1.0.9/tests/harness/testsuite.cc 2009-03-04 13:06:28.000000000 +0000 +@@ -648,7 +648,7 @@ + } + + int c; +- while ((c = gnu_getopt_long(argc, argv, opts.c_str(), long_opts, 0)) != EOF) ++ while ((c = gnu_getopt_long(argc, argv, opts.c_str(), long_opts, 0)) != -1) + { + switch (c) { + case 'v': diff --git a/xapian-core.spec b/xapian-core.spec index a656cc6..9d44d93 100644 --- a/xapian-core.spec +++ b/xapian-core.spec @@ -1,13 +1,14 @@ Summary: The Xapian Probabilistic Information Retrieval Library Name: xapian-core Version: 1.0.9 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Applications/Databases URL: http://www.xapian.org/ Requires: %{name}-libs = %{version} Source0: http://www.oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.gz Patch0: multilib-devel-conflict-fix.patch +Patch1: xapian-core-1.0.9-includes.patch BuildRequires: autoconf automake libtool BuildRequires: zlib-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -42,6 +43,7 @@ files needed for building packages which use Xapian %prep %setup -q -n %{name}-%{version} %patch0 -p1 -b .multilibfix +%patch1 -p1 -b .includes %build # FC6 (at least) has a patched libtool which knows not to set rpath for @@ -120,6 +122,9 @@ rm -rf %{buildroot} %{_mandir}/man1/xapian-config.1* %changelog +* Wed Mar 04 2009 Caolán McNamara - 1.0.9-4 +- include stdio.h for rename, fix bare #elif, EOF -> -1 for getopt + * Wed Feb 25 2009 Fedora Release Engineering - 1.0.9-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild