Changeset: 4a670ca09df5 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4a670ca09df5 Modified Files: Branch: sciql Log Message:
Merge with default branch. diffs (191 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -419,6 +419,10 @@ fi Summary: MonetDB5 SQL server modules Group: Applications/Databases Requires: MonetDB5-server = %{version}-%{release} +%if (0%{?fedora} > 14) +# for systemd-tmpfiles +Requires: systemd-units +%endif Obsoletes: MonetDB-SQL-devel Obsoletes: %{name}-SQL @@ -431,16 +435,23 @@ accelerators, SQL- and XML- frontends. This package contains the SQL frontend for MonetDB5. If you want to use SQL with MonetDB, you will need to install this package. +%if (0%{?fedora} > 14) +%post SQL-server5 +systemd-tmpfiles --create %{_sysconfdir}/tmpfiles.d/monetdbd.conf +%endif + %files SQL-server5 %defattr(-,root,root) %{_bindir}/monetdb %{_bindir}/monetdbd %dir %attr(775,monetdb,monetdb) %{_localstatedir}/log/monetdb -%if ! (0%{?fedora} > 14) +%if (0%{?fedora} > 14) +# Fedora 15 and newer +%{_sysconfdir}/tmpfiles.d/monetdbd.conf +%else +# Fedora 14 and older %dir %attr(775,monetdb,monetdb) %{_localstatedir}/run/monetdb %exclude %{_sysconfdir}/tmpfiles.d/monetdbd.conf -%else -%{_sysconfdir}/tmpfiles.d/monetdbd.conf %endif %config(noreplace) %{_localstatedir}/monetdb5/dbfarm/.merovingian_properties %{_libdir}/monetdb5/autoload/*_sql.mal diff --git a/common/stream/stream.c b/common/stream/stream.c --- a/common/stream/stream.c +++ b/common/stream/stream.c @@ -228,21 +228,23 @@ mnstr_write(stream *s, const void *buf, void mnstr_close(stream *s) { + if (s) { #ifdef STREAM_DEBUG - printf("close %s\n", s->name ? s->name : "<unnamed>"); + printf("close %s\n", s->name ? s->name : "<unnamed>"); #endif - if (s) (*s->close) (s); + } } void mnstr_destroy(stream *s) { + if (s) { #ifdef STREAM_DEBUG - printf("destroy %s\n", s->name ? s->name : "<unnamed>"); + printf("destroy %s\n", s->name ? s->name : "<unnamed>"); #endif - if (s) (*s->destroy) (s); + } } char * @@ -272,11 +274,11 @@ mnstr_flush(stream *s) int mnstr_fsync(stream *s) { + if (!s) + return -1; #ifdef STREAM_DEBUG printf("fsync %s (%d)\n", s->name ? s->name : "<unnamed>", s->errnr); #endif - if (!s) - return -1; assert(s->access == ST_WRITE); if (s->errnr) return s->errnr; @@ -288,11 +290,11 @@ mnstr_fsync(stream *s) int mnstr_fgetpos(stream *s, lng *p) { + if (!s) + return -1; #ifdef STREAM_DEBUG printf("fgetpos %s\n", s->name ? s->name : "<unnamed>"); #endif - if (!s) - return -1; assert(s->access == ST_WRITE); if (s->errnr) return s->errnr; @@ -304,11 +306,11 @@ mnstr_fgetpos(stream *s, lng *p) int mnstr_fsetpos(stream *s, lng p) { + if (!s) + return -1; #ifdef STREAM_DEBUG printf("fsetpos %s\n", s->name ? s->name : "<unnamed>"); #endif - if (!s) - return -1; if (s->errnr) return s->errnr; if (s->fsetpos) diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -574,9 +574,9 @@ yes-*-*) ;; esac case "$CC-$gcc_ver" in - *clang*-*|*-4.[[3-9]].*|*-[[5-9]].*) - dnl this triggers a warning (-> error) with gcc < 4.3 - X_CFLAGS="$X_CFLAGS -Wstack-protector" + *clang*-*|*-[[4-9]].*) + dnl gcc < 4 does not know these + X_CFLAGS="$X_CFLAGS -fstack-protector-all -Wstack-protector" ;; esac case "$CC-$gcc_ver" in diff --git a/monetdb5/extras/sphinx/30_sphinx.mal b/monetdb5/extras/sphinx/30_sphinx.mal new file mode 100644 --- /dev/null +++ b/monetdb5/extras/sphinx/30_sphinx.mal @@ -0,0 +1,18 @@ +# The contents of this file are subject to the MonetDB Public License +# Version 1.1 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# http://www.monetdb.org/Legal/MonetDBLicense +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +# License for the specific language governing rights and limitations +# under the License. +# +# The Original Code is the MonetDB Database System. +# +# The Initial Developer of the Original Code is CWI. +# Portions created by CWI are Copyright (C) 1997-July 2008 CWI. +# Copyright August 2008-2011 MonetDB B.V. +# All Rights Reserved. + +include sphinx; diff --git a/monetdb5/extras/sphinx/Makefile.ag b/monetdb5/extras/sphinx/Makefile.ag --- a/monetdb5/extras/sphinx/Makefile.ag +++ b/monetdb5/extras/sphinx/Makefile.ag @@ -35,4 +35,10 @@ headers_sphinx_mal = { SOURCES = sphinx.mal } -EXTRA_DIST = sphinx.mal +headers_autoload = { + HEADERS = mal + DIR = libdir/monetdb5/autoload + SOURCES = 30_sphinx.mal +} + +EXTRA_DIST = sphinx.mal 30_sphinx.mal diff --git a/monetdb5/extras/sphinx/sphinx.c b/monetdb5/extras/sphinx/sphinx.c --- a/monetdb5/extras/sphinx/sphinx.c +++ b/monetdb5/extras/sphinx/sphinx.c @@ -74,7 +74,7 @@ sphinx_searchIndexLimit(BAT **ret, /* pu return MAL_SUCCEED; } -static str +str SPHINXsearchIndexLimit(int *ret, str *query, str *index, int *limit) { BAT *b = NULL; diff --git a/monetdb5/extras/sphinx/sphinx.h b/monetdb5/extras/sphinx/sphinx.h --- a/monetdb5/extras/sphinx/sphinx.h +++ b/monetdb5/extras/sphinx/sphinx.h @@ -36,6 +36,7 @@ #define sphinx_export extern #endif +sphinx_export str SPHINXsearchIndexLimit(int *ret, str *query, str *index, int *limit); sphinx_export str SPHINXsearchIndexLimitWrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); #endif /* SPHINX_H */ _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list