Changeset: 60fe9e1e930e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=60fe9e1e930e Modified Files: Branch: default Log Message:
Complete merge diffs (truncated from 760 to 300 lines): diff -r ff6167abbb1f -r 60fe9e1e930e MonetDB4/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MonetDB4/license.txt Sat May 29 23:32:30 2010 +0200 @@ -0,0 +1,16 @@ +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://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html + +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-2010 MonetDB B.V. +All Rights Reserved. diff -r ff6167abbb1f -r 60fe9e1e930e MonetDB5/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MonetDB5/license.txt Sat May 29 23:32:30 2010 +0200 @@ -0,0 +1,16 @@ +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://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html + +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-2010 MonetDB B.V. +All Rights Reserved. diff -r ff6167abbb1f -r 60fe9e1e930e MonetDB5/src/mal/mal_linker.mx --- a/MonetDB5/src/mal/mal_linker.mx Sat May 29 23:31:52 2010 +0200 +++ b/MonetDB5/src/mal/mal_linker.mx Sat May 29 23:32:30 2010 +0200 @@ -324,9 +324,13 @@ an environment variable. @c static int -cmpstr(const void *p1, const void *p2) +cmpstr(const void *_p1, const void *_p2) { - return strcmp(*(char* const*)p1, *(char* const*)p2); + const char *p1 = *(char* const*)_p1; + const char *p2 = *(char* const*)_p2; + const char *f1 = strrchr(p1, (int) DIR_SEP); + const char *f2 = strrchr(p2, (int) DIR_SEP); + return strcmp(f1?f1:p1, f2?f2:p2); } #define MAXMULTISCRIPT 48 @@ -377,7 +381,6 @@ /* see if this is a directory, if so, recurse */ if (recurse == 1 && (rdir = opendir(fullname)) != NULL) { struct dirent *e; - int ps = lasts; /* list *ext, sort, return */ while ((e = readdir(rdir)) != NULL) { if (strcmp(e->d_name, "..") == 0 || strcmp(e->d_name, ".") == 0) @@ -398,10 +401,6 @@ if (lasts >= MAXMULTISCRIPT) break; } - if (lasts - ps > 0) { - /* assure that an ordering such as 10_first, 20_second works */ - qsort(strs + ps, lasts - ps, sizeof(char *), cmpstr); - } (void)closedir(rdir); } else { strcat(fullname + i + 1, ext); @@ -416,8 +415,10 @@ mod_path++; } if (lasts > 0) { - int i = 0; + size_t i = 0; int c; + /* assure that an ordering such as 10_first, 20_second works */ + qsort(strs, lasts, sizeof(char *), cmpstr); for (c = 0; c < lasts; c++) i += strlen(strs[c]) + 1; /* PATH_SEP or \0 */ fullname = GDKrealloc(fullname, i); diff -r ff6167abbb1f -r 60fe9e1e930e buildtools/Mx/Code.c --- a/buildtools/Mx/Code.c Sat May 29 23:31:52 2010 +0200 +++ b/buildtools/Mx/Code.c Sat May 29 23:32:30 2010 +0200 @@ -375,6 +375,7 @@ case Clex: case CCyacc: case CClex: + case MALcode: break; case Haskell: diff -r ff6167abbb1f -r 60fe9e1e930e buildtools/Mx/Mx.h --- a/buildtools/Mx/Mx.h Sat May 29 23:31:52 2010 +0200 +++ b/buildtools/Mx/Mx.h Sat May 29 23:32:30 2010 +0200 @@ -83,6 +83,7 @@ char *ext; } Directive; +extern char *inputdir; extern char *outputdir; extern Directive str2dir[]; diff -r ff6167abbb1f -r 60fe9e1e930e buildtools/Mx/disclaimer.c --- a/buildtools/Mx/disclaimer.c Sat May 29 23:31:52 2010 +0200 +++ b/buildtools/Mx/disclaimer.c Sat May 29 23:32:30 2010 +0200 @@ -23,23 +23,50 @@ #include <string.h> #include <limits.h> +#include "Mx.h" #include "disclaimer.h" -int disclaimer = 0; +int disclaimer = 1; char *disclaimerfile; -static const char defaultfile[] = "COPYRIGHT"; +static const char defaultfile[] = "license.txt"; static FILE * openDisclaimerFile(const char *filename) { - FILE *fp; + FILE *fp = NULL; if (!filename || strlen(filename) < 1) filename = defaultfile; - if ((fp = fopen(filename, "r")) == 0) - fprintf(stderr, "Mx: can't open disclaimer file '%s' (skipping).\n", filename); + if (*filename == DIR_SEP) { + fp = fopen(filename, "r"); + } else { + char buf[8096]; + size_t len; + buf[0] = '\0'; + strncat(buf, inputdir, 8096 - 1); + len = strlen(buf); + if (len < 8095 && buf[len - 1] != DIR_SEP) + buf[len++] = DIR_SEP; + /* search backwards, such that we can find the license.txt + * file in the root of each module */ + strncat(buf, filename, 8095 - len); + while (len > 0 && (fp = fopen(buf, "r")) == 0) { + /* remove last path */ + len--; /* the trailing slash */ + while (len > 0) { + if (buf[--len] == '/') { + buf[++len] = '\0'; + break; + } + } + strncat(buf, filename, 8096 - len - 1); + } + } + + if (fp == NULL) + fprintf(stderr, "Mx: can't open licence file '%s' (skipping).\n", filename); return fp; } @@ -104,8 +131,9 @@ "c", "/*", " * ", " */",}, { "h", "/*", " * ", " */",}, { MX_CXX_SUFFIX, "/*", " * ", " */",}, { - "html", "<!--", " + ", " -->",}, { + "html", "<!--", "", " -->",}, { "tex", "", "% ", "",}, { + "mal", "", "# ", "",}, { "mil", "", "# ", "",}, { "m", "", "# ", "",}, { "mx", "", "@' ", ""}, { diff -r ff6167abbb1f -r 60fe9e1e930e buildtools/mel/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildtools/mel/license.txt Sat May 29 23:32:30 2010 +0200 @@ -0,0 +1,16 @@ +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://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html + +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-2010 MonetDB B.V. +All Rights Reserved. diff -r ff6167abbb1f -r 60fe9e1e930e clients/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/clients/license.txt Sat May 29 23:32:30 2010 +0200 @@ -0,0 +1,16 @@ +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://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html + +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-2010 MonetDB B.V. +All Rights Reserved. diff -r ff6167abbb1f -r 60fe9e1e930e geom/RunMtest.bat.in --- a/geom/RunMtest.bat.in Sat May 29 23:31:52 2010 +0200 +++ b/geom/RunMtest.bat.in Sat May 29 23:32:30 2010 +0200 @@ -36,6 +36,10 @@ set MOD_PATH=%builddir%\src\monetdb%V%;%MOD_PATH% set MOD_PATH=%builddir%\src\monetdb%V%\.libs;%MOD_PATH% +REM enable auto-loading of modules before `make install` +if not exist %builddir%\src\monetdb%V%\autoload mkdir %builddir%\src\monetdb%V%\autoload +copy /y %srcdir%\src\monetdb%V%\??_*.mal %builddir%\src\monetdb%V%\autoload + set PATH=%MOD_PATH%;%PATH% set PATH=%builddir%\conf;%PATH% diff -r ff6167abbb1f -r 60fe9e1e930e geom/RunMtest.in --- a/geom/RunMtest.in Sat May 29 23:31:52 2010 +0200 +++ b/geom/RunMtest.in Sat May 29 23:32:30 2010 +0200 @@ -40,9 +40,12 @@ for d in src/monetdb$V do MOD_PATH="${MOD_PATH}${builddir}/$d/.libs:${builddir}/$d:" + # enable auto-loading of modules before `make install` + mkdir -p ${builddir}/d/autoload + cp -f ${srcdir}/$d/[0-9][0-9]_*.mal ${builddir}/$d/autoload/ done +MOD_PATH="${MOD_PATH}`monetdb-sql-config --modpath$V`:" MOD_PATH="${MOD_PATH}`monetdb$V-config --modpath`" -MOD_PATH="${MOD_PATH}:`monetdb-sql-config --modpath$V`" # make sure scripts are executable for x in "${builddir}/conf/${pkg}-config" diff -r ff6167abbb1f -r 60fe9e1e930e geom/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/geom/license.txt Sat May 29 23:32:30 2010 +0200 @@ -0,0 +1,16 @@ +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://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html + +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-2010 MonetDB B.V. +All Rights Reserved. diff -r ff6167abbb1f -r 60fe9e1e930e java/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/license.txt Sat May 29 23:32:30 2010 +0200 @@ -0,0 +1,16 @@ +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://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html + +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-2010 MonetDB B.V. +All Rights Reserved. diff -r ff6167abbb1f -r 60fe9e1e930e python/monetdb/mapi2.py --- a/python/monetdb/mapi2.py Sat May 29 23:31:52 2010 +0200 +++ b/python/monetdb/mapi2.py Sat May 29 23:32:30 2010 +0200 @@ -28,6 +28,8 @@ import crypt import platform _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
