Changeset: 2ec4de549bf6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ec4de549bf6
Modified Files:
MonetDB/src/common/Makefile.ag
MonetDB/src/common/monet_getopt.h
MonetDB/src/common/monet_options.mx
MonetDB/src/common/monet_utils.mx
MonetDB/src/gdk/gdk.mx
MonetDB/src/gdk/gdk_atoms.mx
MonetDB/src/gdk/gdk_bat.mx
MonetDB/src/gdk/gdk_bbp.mx
MonetDB/src/gdk/gdk_heap.mx
MonetDB/src/gdk/gdk_relop.mx
MonetDB/src/gdk/gdk_scanselect.mx
MonetDB/src/gdk/gdk_scanselect_defs.mx
MonetDB/src/gdk/gdk_utils.mx
MonetDB4/src/modules/contrib/bat_cast.mx
MonetDB4/src/modules/contrib/iterator.mx
MonetDB4/src/modules/contrib/salgebra.mx
MonetDB4/src/modules/plain/Makefile.ag
MonetDB4/src/modules/plain/aggrX3_ri.mx
MonetDB4/src/modules/plain/algebra.mx
MonetDB4/src/modules/plain/ascii_io.mx
MonetDB4/src/modules/plain/bat_arith.mx
MonetDB4/src/modules/plain/decimal.mx
MonetDB4/src/modules/plain/monettime.mx
MonetDB4/src/modules/plain/pqueue.mx
MonetDB4/src/modules/plain/radix.mx
MonetDB4/src/modules/plain/str.mx
MonetDB4/src/modules/plain/xtables.mx
MonetDB4/src/monet/Makefile.ag
MonetDB4/src/monet/monet_client.mx
MonetDB4/src/monet/monet_interpreter.mx
MonetDB4/src/monet/monet_tbl.mx
MonetDB5/src/extras/crackers/crackers_joins.mx
MonetDB5/src/mal/Makefile.ag
MonetDB5/src/mal/mal_client.mx
MonetDB5/src/mal/mal_instruction.mx
MonetDB5/src/mal/mal_interpreter.mx
MonetDB5/src/mal/mal_parser.mx
MonetDB5/src/mal/mal_type.mx
MonetDB5/src/modules/atoms/mtime.mx
MonetDB5/src/modules/atoms/str.mx
MonetDB5/src/modules/kernel/aggr_ri.mx
MonetDB5/src/modules/kernel/algebra.mx
MonetDB5/src/modules/kernel/group.mx
MonetDB5/src/modules/mal/Tests/register00.stable.out
MonetDB5/src/modules/mal/language.mx
MonetDB5/src/modules/mal/pqueue.mx
MonetDB5/src/modules/mal/radix.mx
MonetDB5/src/modules/mal/remote.mx
MonetDB5/src/modules/mal/tablet.mx
MonetDB5/src/modules/mal/tablet_mk.mx
MonetDB5/src/modules/mal/tablet_si.mx
MonetDB5/src/modules/mal/tablet_sql.mx
MonetDB5/src/optimizer/opt_mergetable.mx
buildtools/Mx/Mx.h
buildtools/burg/b.h
buildtools/conf/MonetDB.m4
clients/src/mapiclient/mclient.c
clients/src/mapiclient/msqldump.c
clients/src/mapiclient/stethoscope.c
clients/src/mapilib/Mapi.mx
clients/src/odbc/driver/ODBCGlobal.h
configure.ag
pathfinder/modules/pftijah/pftijah.mx
pathfinder/modules/pftijah/serialize_pftijah.mx
pathfinder/modules/pftijah/termdb.mx
pathfinder/runtime/serialize.mx
pathfinder/runtime/shredder.mx
pathfinder/runtime/vx_index.mx
pathfinder/runtime/xrpc_common.mx
sql/src/server/sql_scan.c
Branch: default
Log Message:
monet_utils: remove
Move content from monet_options.mx to monet_config.h and gdk.mx.
Effectuate removal, and change locations and includes where necessary.
Solved some issues that evolved out of getting rid of monet_utils, since
includes are done unconditionally for everything now.
diffs (truncated from 2951 to 300 lines):
diff -r 6d0ae82d8d1a -r 2ec4de549bf6 MonetDB/src/common/Makefile.ag
--- a/MonetDB/src/common/Makefile.ag Thu Jan 13 18:08:17 2011 +0100
+++ b/MonetDB/src/common/Makefile.ag Thu Jan 13 21:36:11 2011 +0100
@@ -23,13 +23,13 @@
lib_mutils = {
NAME = mutils
- SOURCES = monet_utils.mx monet_options.mx monet_getopt.h
+ SOURCES = monet_options.mx monet_getopt.h
}
headers_common = {
DIR = includedir/MonetDB/common
HEADERS = h
- SOURCES = monet_utils.mx monet_options.mx monet_getopt.h \
+ SOURCES = monet_options.mx monet_getopt.h \
dummy_gdk_utils.mx
}
diff -r 6d0ae82d8d1a -r 2ec4de549bf6 MonetDB/src/common/monet_getopt.h
--- a/MonetDB/src/common/monet_getopt.h Thu Jan 13 18:08:17 2011 +0100
+++ b/MonetDB/src/common/monet_getopt.h Thu Jan 13 21:36:11 2011 +0100
@@ -53,8 +53,6 @@
# include <ctype.h>
#endif
-#include "monet_utils.h"
-
#ifdef __cplusplus
extern "C" {
#endif
diff -r 6d0ae82d8d1a -r 2ec4de549bf6 MonetDB/src/common/monet_options.mx
--- a/MonetDB/src/common/monet_options.mx Thu Jan 13 18:08:17 2011 +0100
+++ b/MonetDB/src/common/monet_options.mx Thu Jan 13 21:36:11 2011 +0100
@@ -99,7 +99,6 @@
@c
#include "monetdb_config.h"
#include "monet_options.h"
-#include "monet_utils.h"
#ifndef HAVE_GETOPT_LONG
# include "monet_getopt.h"
#else
diff -r 6d0ae82d8d1a -r 2ec4de549bf6 MonetDB/src/common/monet_utils.mx
--- a/MonetDB/src/common/monet_utils.mx Thu Jan 13 18:08:17 2011 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-@/
-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-2011 MonetDB B.V.
-All Rights Reserved.
-@
-
-@f monet_utils
-@a N.J. Nes
-@* utils
-@T
-The monet utils contains all general functionality needed by both clients and
-server.
-
-@h
-#ifndef _MU_H_
-#define _MU_H_
-
-#ifdef WIN32
-#ifndef LIBMUTILS
-#define mutils_export extern __declspec(dllimport)
-#else
-#define mutils_export extern __declspec(dllexport)
-#endif
-#else
-#define mutils_export extern
-#endif
-
-#define SLASH_2_DIR_SEP(s) {char *t; for(t=strchr(s, '/' ); t;
t=strchr(t+1, '/' )) *t=DIR_SEP;}
-#define DIR_SEP_2_SLASH(s) {char *t; for(t=strchr(s, DIR_SEP); t;
t=strchr(t+1, DIR_SEP)) *t='/' ;}
-
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#include <stdio.h> /* NULL, printf etc. */
-#include <stdlib.h>
-#include <errno.h>
-#include <stdarg.h> /* va_alist.. */
-
-#ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-#elif defined __GNUC__
-# define alloca __builtin_alloca
-#elif defined _AIX
-# define alloca __alloca
-#elif defined _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-#else
-# include <stddef.h>
-void *alloca(size_t);
-#endif
-
-#include <assert.h>
-
-/* Backward compatibility: configure figures out whether it needs to
- define "inline" as something else for the architecture it is testing.
- All uses in the source use "INLINE", so until all occurances of
- "INLINE" have been replaced by "inline", we just define the latter as
- the former. */
-#define INLINE inline
-
-#define REGISTER register
-
-#ifdef HAVE_LONG_LONG
-typedef long long lng;
-
-#define SIZEOF_LNG SIZEOF_LONG_LONG
-#else
-#ifdef HAVE___INT64
-typedef __int64 lng;
-
-#define SIZEOF_LNG SIZEOF___INT64
-#endif
-#endif
-
-#ifndef HAVE_SSIZE_T
-#if SIZEOF_SIZE_T == SIZEOF_INT
-typedef int ssize_t;
-#else
-typedef lng ssize_t;
-#endif
-#define HAVE_SSIZE_T 1
-#endif
-
-#ifndef HAVE_PTRDIFF_T
-#if SIZEOF_SIZE_T == SIZEOF_INT
-typedef int ptrdiff_t;
-#else
-typedef lng ptrdiff_t;
-#endif
-#define HAVE_PTRDIFF_T 1
-#endif
-
-/* define printf formats for printing size_t and ssize_t variables */
-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901 &&
!defined(__svr4__) && !defined(WIN32) && !defined(__sgi)) || __GNUC__ > 3
-#define SZFMT "%zu"
-#define SSZFMT "%zd"
-#elif defined(__MINGW32__)
-#define SZFMT "%u"
-#define SSZFMT "%ld"
-#elif SIZEOF_SIZE_T == SIZEOF_INT
-#define SZFMT "%u"
-#define SSZFMT "%d"
-#elif SIZEOF_SIZE_T == SIZEOF_LONG
-#define SZFMT "%lu"
-#define SSZFMT "%ld"
-#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG || SIZEOF_SIZE_T == SIZEOF___INT64
-#define SZFMT ULLFMT
-#define SSZFMT LLFMT
-#else
-#error no definition for SZFMT/SSZFMT
-#endif
-
-/* prompts for MAPI protocol */
-#define PROMPTBEG '\001' /* start prompt bracket */
-#define PROMPT1 "\001\001\n" /* prompt: ready for new query
*/
-#define PROMPT2 "\001\002\n" /* prompt: more data needed */
-
-#define short_int_SWAP(s) ((short)(((0x00ff&(s))<<8) | ((0xff00&(s))>>8)))
-
-#define normal_int_SWAP(i) (((0x000000ff&(i))<<24) | ((0x0000ff00&(i))<<8) | \
- ((0x00ff0000&(i))>>8) | ((0xff000000&(i))>>24))
-
-#define long_long_SWAP(l) \
- ((((lng)normal_int_SWAP(l))<<32) |\
- (0xffffffff&normal_int_SWAP(l>>32)))
-
-#endif /* _MU_H_ */
diff -r 6d0ae82d8d1a -r 2ec4de549bf6 MonetDB/src/gdk/gdk.mx
--- a/MonetDB/src/gdk/gdk.mx Thu Jan 13 18:08:17 2011 +0100
+++ b/MonetDB/src/gdk/gdk.mx Thu Jan 13 21:36:11 2011 +0100
@@ -317,8 +317,6 @@
#ifndef _GDK_H_
#define _GDK_H_
-#include <monet_utils.h>
-
/* standard includes upon which all configure tests depend */
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
@@ -1468,7 +1466,7 @@
#define bunfastins(b, h, t) \
do { \
- REGISTER BUN _p = BUNlast(b); \
+ register BUN _p = BUNlast(b); \
if (_p == BUN_MAX || BATcount(b) == BUN_MAX) { \
GDKerror("bunfastins: bat too large\n"); \
goto bunins_failed; \
@@ -1605,7 +1603,7 @@
#define BUNhead(bi,p) ((bi).b->hvarsized?BUNhvar(bi,p):BUNhloc(bi,p))
#define BUNtail(bi,p) ((bi).b->tvarsized?BUNtvar(bi,p):BUNtloc(bi,p))
-static INLINE BATiter
+static inline BATiter
bat_iterator(BAT *b)
{
BATiter bi;
@@ -1619,7 +1617,7 @@
#ifdef NDEBUG
#define BUNlast(b) ((b)->batFirst + (b)->batCount)
#else
-static INLINE BUN
+static inline BUN
BUNlast(BAT *b)
{
BUN last;
@@ -2721,6 +2719,15 @@
#define FORCEMITOMASK (1<<29)
#define FORCEMITODEBUG if (GDKdebug & FORCEMITOMASK)
+#define short_int_SWAP(s) ((short)(((0x00ff&(s))<<8) | ((0xff00&(s))>>8)))
+
+#define normal_int_SWAP(i) (((0x000000ff&(i))<<24) | ((0x0000ff00&(i))<<8) | \
+ ((0x00ff0000&(i))>>8) | ((0xff000000&(i))>>24))
+
+#define long_long_SWAP(l) \
+ ((((lng)normal_int_SWAP(l))<<32) |\
+ (0xffffffff&normal_int_SWAP(l>>32)))
+
gdk_export int GDKnrofthreads;
gdk_export int GDKembedded;
gdk_export int GDKprotected;
@@ -2804,11 +2811,11 @@
extern "C" {
#endif
-static INLINE bat
-BBPcheck(REGISTER bat x, REGISTER const char *y)
+static inline bat
+BBPcheck(register bat x, register const char *y)
{
if (x && x != bat_nil) {
- REGISTER bat z = ABS(x);
+ register bat z = ABS(x);
if (z >= BBPsize || BBP[z].nme[0] == NULL) {
CHECKDEBUG THRprintf(GDKout,"#%s: range error %d\n", y,
(int) x);
@@ -2819,10 +2826,10 @@
return 0;
}
-static INLINE BAT *
-BATdescriptor(REGISTER bat i)
+static inline BAT *
+BATdescriptor(register bat i)
{
- REGISTER BAT *b = NULL;
+ register BAT *b = NULL;
if (BBPcheck(i, "BATdescriptor")) {
BBPfix(i);
@@ -2833,7 +2840,7 @@
return b;
}
-static INLINE char *
+static inline char *
Hpos(BATiter *bi, BUN p)
{
bi->hvid = bi->b->hseqbase;
@@ -2842,7 +2849,7 @@
return (char*)&bi->hvid;
}
-static INLINE char *
+static inline char *
Tpos(BATiter *bi, BUN p)
{
bi->tvid = bi->b->tseqbase;
@@ -2851,8 +2858,8 @@
return (char*)&bi->tvid;
}
-static INLINE BAT *
-BATmirror(REGISTER BAT *b)
+static inline BAT *
+BATmirror(register BAT *b)
{
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list