Changeset: 3c451754bfb2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3c451754bfb2
Added Files:
        sql/test/miscellaneous/Tests/select_groupby.sql
        sql/test/miscellaneous/Tests/select_groupby.stable.err
        sql/test/miscellaneous/Tests/select_groupby.stable.out
Removed Files:
        sql/test/miscellaneous/README
        sql/test/miscellaneous/Tests/now.sql
        sql/test/miscellaneous/Tests/now.stable.err
Modified Files:
        NT/monetdb_config.h.in
        clients/Tests/MAL-signatures.stable.out
        clients/Tests/MAL-signatures.stable.out.int128
        clients/Tests/exports.stable.out
        clients/mapiclient/Tests/stethoscope--help.stable.err
        clients/mapiclient/dump.c
        clients/mapiclient/mhelp.c
        clients/mapiclient/msqldump.c
        common/utils/mutils.c
        configure.ag
        gdk/gdk_posix.c
        gdk/gdk_private.h
        gdk/gdk_system.c
        gdk/gdk_system.h
        gdk/gdk_utils.c
        monetdb5/mal/mal_builder.c
        monetdb5/mal/mal_builder.h
        monetdb5/mal/mal_client.c
        monetdb5/mal/mal_client.h
        monetdb5/mal/mal_instruction.c
        monetdb5/mal/mal_instruction.h
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_module.c
        monetdb5/mal/mal_profiler.c
        monetdb5/modules/atoms/mtime.c
        monetdb5/modules/mal/Tests/inspect05.stable.out.int128
        monetdb5/modules/mal/profiler.c
        monetdb5/modules/mal/profiler.mal
        sql/backends/monet5/rel_bin.c
        sql/backends/monet5/sql.c
        sql/backends/monet5/sql_cat.c
        sql/backends/monet5/sql_gencode.c
        sql/backends/monet5/sql_statement.c
        sql/backends/monet5/sql_upgrades.c
        sql/scripts/Makefile.ag
        sql/server/rel_exp.c
        sql/server/rel_optimizer.c
        sql/server/rel_psm.c
        sql/server/rel_rel.c
        sql/server/rel_schema.c
        sql/server/rel_updates.c
        sql/server/sql_parser.y
        
sql/test/BugDay_2005-12-19_2.9.3/Tests/default_next_value_for_non_ex_seq.SF.1246631.stable.err
        
sql/test/BugTracker-2009/Tests/segfault_when_quitting_debugger.SF-2538837.stable.out
        sql/test/BugTracker-2012/Tests/create_function.Bug-3172.sql
        sql/test/BugTracker-2012/Tests/create_function.Bug-3172.stable.err
        sql/test/BugTracker-2012/Tests/create_function.Bug-3172.stable.out
        
sql/test/BugTracker-2012/Tests/table_function_with_column_subselects.Bug-3172.sql
        
sql/test/BugTracker-2012/Tests/table_function_with_column_subselects.Bug-3172.stable.err
        sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.stable.err
        sql/test/BugTracker-2014/Tests/current_timestamp.Bug-3427.stable.out
        sql/test/BugTracker-2014/Tests/manifold.Bug-3556.stable.out
        sql/test/BugTracker-2017/Tests/side-effect.Bug-6397.stable.out
        
sql/test/BugTracker-2019/Tests/disallow_duplicate_column_aliases.Bug-6723.stable.out
        sql/test/BugTracker-2019/Tests/prepare-types.Bug-6724.stable.out
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-1join-query.stable.out
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-explain-2join-query.stable.out
        sql/test/Tests/comment-dump.stable.out
        sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
        sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
        sql/test/emptydb/Tests/check.stable.out
        sql/test/emptydb/Tests/check.stable.out.32bit
        sql/test/emptydb/Tests/check.stable.out.int128
        sql/test/miscellaneous/Tests/All
        sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade/Tests/upgrade.stable.out
        sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit
        sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
        testing/Mtest.py.in
        tools/merovingian/daemon/merovingian.c
Branch: compactprofiler
Log Message:

Merge with default


diffs (truncated from 3442 to 300 lines):

diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -508,9 +508,6 @@
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #define HAVE_SYS_STAT_H 1
 
-/* Define to 1 if you have the <sys/sysctl.h> header file. */
-/* #undef HAVE_SYS_SYSCTL_H */
-
 /* Define to 1 if you have the <sys/times.h> header file. */
 /* #undef HAVE_SYS_TIMES_H */
 
diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -660,7 +660,7 @@ stdout of test 'MAL-signatures` in direc
 [ "bat",       "orderidx",     "pattern bat.orderidx(bv:bat[:any_1]):void ",   
"OIDXcreate;",  "Introduces the OID index arrangement of ordered values"        
]
 [ "bat",       "orderidx",     "pattern bat.orderidx(bv:bat[:any_1], 
pieces:int):void ",       "OIDXcreate;",  "Introduces the OID index arrangement 
of ordered values"        ]
 [ "bat",       "orderidx",     "pattern bat.orderidx(bv:bat[:any_1], 
l:bat[:any_1]...):void ", "OIDXmerge;",   "Consolidates the OID index 
arrangement"        ]
-[ "bat",       "pack", "pattern bat.pack(X_0:any_2...):bat[:any_2] ",  
"MATpackValues;",       "Materialize the MAT (of values) into a BAT"    ]
+[ "bat",       "pack", "pattern bat.pack(X_0:any_2...):bat[:any_2] ",  
"MATpackValues;",       "Materialize the values into a BAT. Avoiding a clash 
with mat.pack() in mergetable"     ]
 [ "bat",       "partition",    "pattern bat.partition(b:bat[:any_1], 
pieces:int, n:int):bat[:any_1] ", "CMDBATpartition2;",    "Create the n-th 
slice over the BAT broken into several pieces."        ]
 [ "bat",       "partition",    "pattern 
bat.partition(b:bat[:any_1]):bat[:any_1]... ", "CMDBATpartition;",     "Create 
a serie of slices over the BAT argument. The BUNs are distributed evenly."      
]
 [ "bat",       "replace",      "command bat.replace(b:bat[:any_1], 
rid:bat[:oid], val:bat[:any_1]):bat[:any_1] ",      "BKCbat_inplace;",      
"Perform replace for all BUNs of the second BAT into the first."        ]
@@ -11544,9 +11544,11 @@ stdout of test 'MAL-signatures` in direc
 [ "profiler",  "getSystemTime",        "command profiler.getSystemTime():lng 
",        "CMDgetSystemTime;",    "Obtain the user timing information."   ]
 [ "profiler",  "getTrace",     "pattern profiler.getTrace(e:str):bat[:any_1] 
",        "CMDgetTrace;", "Get the trace details of a specific event"     ]
 [ "profiler",  "getUserTime",  "command profiler.getUserTime():lng ",  
"CMDgetUserTime;",      "Obtain the user timing information."   ]
+[ "profiler",  "getlimit",     "command profiler.getlimit():int ",     
"CMDgetprofilerlimit;", "Set profiler limit"    ]
 [ "profiler",  "noop", "command profiler.noop():void ",        
"CMDnoopProfiler;",     "Fetch any pending performance events"  ]
 [ "profiler",  "openstream",   "pattern profiler.openstream():void ",  
"CMDopenProfilerStream;",       "Start profiling the events, send to output 
stream"     ]
 [ "profiler",  "setheartbeat", "command profiler.setheartbeat(b:int):void ",   
"CMDsetHeartbeat;",     "Set heart beat performance tracing"    ]
+[ "profiler",  "setlimit",     "command profiler.setlimit(l:int):void ",       
"CMDsetprofilerlimit;", "Get profiler limit"    ]
 [ "profiler",  "start",        "pattern profiler.start():void ",       
"CMDstartProfiler;",    "Start offline performance profiling"   ]
 [ "profiler",  "starttrace",   "pattern profiler.starttrace():void ",  
"CMDstartTrace;",       "Start collecting trace information"    ]
 [ "profiler",  "stop", "pattern profiler.stop():void ",        
"CMDstopProfiler;",     "Stop offline performance profiling"    ]
diff --git a/clients/Tests/MAL-signatures.stable.out.int128 
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -766,7 +766,7 @@ stdout of test 'MAL-signatures` in direc
 [ "bat",       "orderidx",     "pattern bat.orderidx(bv:bat[:any_1]):void ",   
"OIDXcreate;",  "Introduces the OID index arrangement of ordered values"        
]
 [ "bat",       "orderidx",     "pattern bat.orderidx(bv:bat[:any_1], 
pieces:int):void ",       "OIDXcreate;",  "Introduces the OID index arrangement 
of ordered values"        ]
 [ "bat",       "orderidx",     "pattern bat.orderidx(bv:bat[:any_1], 
l:bat[:any_1]...):void ", "OIDXmerge;",   "Consolidates the OID index 
arrangement"        ]
-[ "bat",       "pack", "pattern bat.pack(X_0:any_2...):bat[:any_2] ",  
"MATpackValues;",       "Materialize the MAT (of values) into a BAT"    ]
+[ "bat",       "pack", "pattern bat.pack(X_0:any_2...):bat[:any_2] ",  
"MATpackValues;",       "Materialize the values into a BAT. Avoiding a clash 
with mat.pack() in mergetable"     ]
 [ "bat",       "partition",    "pattern bat.partition(b:bat[:any_1], 
pieces:int, n:int):bat[:any_1] ", "CMDBATpartition2;",    "Create the n-th 
slice over the BAT broken into several pieces."        ]
 [ "bat",       "partition",    "pattern 
bat.partition(b:bat[:any_1]):bat[:any_1]... ", "CMDBATpartition;",     "Create 
a serie of slices over the BAT argument. The BUNs are distributed evenly."      
]
 [ "bat",       "replace",      "command bat.replace(b:bat[:any_1], 
rid:bat[:oid], val:bat[:any_1]):bat[:any_1] ",      "BKCbat_inplace;",      
"Perform replace for all BUNs of the second BAT into the first."        ]
@@ -15948,9 +15948,11 @@ stdout of test 'MAL-signatures` in direc
 [ "profiler",  "getSystemTime",        "command profiler.getSystemTime():lng 
",        "CMDgetSystemTime;",    "Obtain the user timing information."   ]
 [ "profiler",  "getTrace",     "pattern profiler.getTrace(e:str):bat[:any_1] 
",        "CMDgetTrace;", "Get the trace details of a specific event"     ]
 [ "profiler",  "getUserTime",  "command profiler.getUserTime():lng ",  
"CMDgetUserTime;",      "Obtain the user timing information."   ]
+[ "profiler",  "getlimit",     "command profiler.getlimit():int ",     
"CMDgetprofilerlimit;", "Set profiler limit"    ]
 [ "profiler",  "noop", "command profiler.noop():void ",        
"CMDnoopProfiler;",     "Fetch any pending performance events"  ]
 [ "profiler",  "openstream",   "pattern profiler.openstream():void ",  
"CMDopenProfilerStream;",       "Start profiling the events, send to output 
stream"     ]
 [ "profiler",  "setheartbeat", "command profiler.setheartbeat(b:int):void ",   
"CMDsetHeartbeat;",     "Set heart beat performance tracing"    ]
+[ "profiler",  "setlimit",     "command profiler.setlimit(l:int):void ",       
"CMDsetprofilerlimit;", "Get profiler limit"    ]
 [ "profiler",  "start",        "pattern profiler.start():void ",       
"CMDstartProfiler;",    "Start offline performance profiling"   ]
 [ "profiler",  "starttrace",   "pattern profiler.starttrace():void ",  
"CMDstartTrace;",       "Start collecting trace information"    ]
 [ "profiler",  "stop", "pattern profiler.stop():void ",        
"CMDstopProfiler;",     "Stop offline performance profiling"    ]
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -2418,6 +2418,7 @@ InstrPtr newFcnCall(MalBlkPtr mb, char *
 Symbol newFunction(str mod, str nme, int kind);
 MalStkPtr newGlobalStack(int size);
 InstrPtr newInstruction(MalBlkPtr mb, str modnme, str fcnnme);
+InstrPtr newInstructionArgs(MalBlkPtr mb, str modnme, str fcnnme, int args);
 MalBlkPtr newMalBlk(int elements);
 int newMalBlkStmt(MalBlkPtr mb, int elements);
 Plant newPlant(MalBlkPtr mb);
@@ -2425,6 +2426,7 @@ InstrPtr newRaiseStmt(MalBlkPtr mb, str 
 str newRef;
 InstrPtr newReturnStmt(MalBlkPtr mb);
 InstrPtr newStmt(MalBlkPtr mb, const char *module, const char *name);
+InstrPtr newStmtArgs(MalBlkPtr mb, const char *module, const char *name, int 
args);
 Symbol newSymbol(str nme, int kind);
 int newTmpVariable(MalBlkPtr mb, malType type);
 int newTypeVariable(MalBlkPtr mb, malType type);
diff --git a/clients/mapiclient/Tests/stethoscope--help.stable.err 
b/clients/mapiclient/Tests/stethoscope--help.stable.err
--- a/clients/mapiclient/Tests/stethoscope--help.stable.err
+++ b/clients/mapiclient/Tests/stethoscope--help.stable.err
@@ -16,7 +16,6 @@ stethoscope [options]
   -P | --password=<password>
   -p | --port=<portnr>
   -h | --host=<hostname>
-  -c | --convert=<old formated file>
   -j | --json
   -o | --output=<file>
   -b | --beat=<delay> in milliseconds (default 50)
diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -2575,8 +2575,7 @@ dump_database(Mapi mid, stream *toConsol
                goto bailout;
 
        /* start a transaction for the dump */
-       if (!describe)
-               mnstr_printf(toConsole, "%s;\n", start_trx);
+       mnstr_printf(toConsole, "%s;\n", start_trx);
 
        if ((hdl = mapi_query(mid, start_trx)) == NULL || mapi_error(mid))
                goto bailout;
@@ -3095,8 +3094,7 @@ dump_database(Mapi mid, stream *toConsol
        mapi_close_handle(hdl);
 
        /* finally commit the whole transaction */
-       if (!describe)
-               mnstr_printf(toConsole, "COMMIT;\n");
+       mnstr_printf(toConsole, "COMMIT;\n");
        if (sname)
                free(sname);
        if (query)
diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -87,7 +87,7 @@ SQLhelp sqlhelp1[] = {
        {"ANALYZE",
         "Collect column/table/schema data statistics for analysis and 
optimizer usage",
         "ANALYZE ident [ . ident [ column_list ] ] [SAMPLE size] [MINMAX]",
-        "column_list",
+        "ident,column_list",
         "See also 
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/statistics"},
        {"CALL",
         "",
@@ -163,10 +163,10 @@ SQLhelp sqlhelp1[] = {
         
"qname,param,data_type,function_return,statement,ident,language_keyword,external_code",
         "See also 
https://www.monetdb.org/Documentation/Manuals/SQLreference/Functions"},
        {"CREATE INDEX",
-        "",
+        "Create a hint for a secondary index on a column or set of columns of 
a table",
         "CREATE [ UNIQUE | ORDERED | IMPRINTS ] INDEX ident ON qname '(' 
ident_list ')'",
         NULL,
-        NULL},
+        "See also 
https://www.monetdb.org/Documentation/Manuals/SQLreference/Indices"},
        {"CREATE PROCEDURE",
         "Create a user-defined procedure",
         "CREATE [ OR REPLACE ] PROCEDURE qname '(' { '*' | [ param [',' ...]] 
} ')'\n"
@@ -203,12 +203,12 @@ SQLhelp sqlhelp1[] = {
         "ident",
         "See also https://www.monetdb.org/Documentation/SQLreference/Roles"},
        {"CREATE SCHEMA",
-        "",
+        "Create a new schema",
         "CREATE SCHEMA [ IF NOT EXISTS ] schema_name [default_char_set] 
[path_spec] [schema_element]",
         "schema_name,default_char_set,path_spec,schema_element",
         "See also https://www.monetdb.org/Documentation/SQLreference/Schema"},
        {"CREATE SEQUENCE",
-        "Define a new sequence generator",
+        "Define a new integer number sequence generator",
         "CREATE SEQUENCE ident [ AS data_type] [ START [WITH start]] 
[INCREMENT BY increment]\n"
         "[MINVALUE minvalue | NO MINVALUE] [MAXVALUE maxvalue | NO MAXVALUE] 
[CACHE cachevalue] [[NO] CYCLE]",
         "ident,data_type",
@@ -219,17 +219,18 @@ SQLhelp sqlhelp1[] = {
         "table_source",
         NULL},
        {"CREATE TABLE",
-        "",
+        "Create a new table",
         "CREATE TABLE [ IF NOT EXISTS ] qname table_source [STORAGE ident 
string]\n"
         "CREATE TABLE [ IF NOT EXISTS ] qname FROM LOADER function_ref\n"
         "CREATE [ LOCAL | GLOBAL ] { TEMPORARY | TEMP } TABLE [ IF NOT EXISTS 
] qname table_source [on_commit]",
         "table_source,on_commit,function_ref",
         "See also 
https://www.monetdb.org/Documentation/Manuals/SQLreference/Tables"},
        {"CREATE TRIGGER",
-        "",
-        "CREATE [ OR REPLACE ] TRIGGER qname { BEFORE | AFTER } { INSERT | 
DELETE | TRUNCATE ...\n"
-        " | UPDATE [ OF ident [',' ident]] } ON qname REFERENCING 
trigger_reference... triggered_action",
-        "qname,trigger_reference,triggered_action",
+        "Define a triggered action for a table data update event",
+        "CREATE [ OR REPLACE ] TRIGGER qname { BEFORE | AFTER }\n"
+        " { INSERT | DELETE | TRUNCATE | UPDATE [ OF ident_list ] }\n"
+        " ON qname [ REFERENCING trigger_reference [...] ] triggered_action",
+        "qname,ident_list,trigger_reference,triggered_action",
         "See also 
https://www.monetdb.org/Documentation/SQLreference/Triggers"},
        {"CREATE TYPE",
         "Add user defined type to the type system ",
@@ -237,12 +238,12 @@ SQLhelp sqlhelp1[] = {
         NULL,
         NULL},
        {"CREATE USER",
-        "Create a new user",
+        "Create a new database user",
         "CREATE USER ident WITH [ENCRYPTED | UNENCRYPTED] PASSWORD string NAME 
string SCHEMA ident",
         "ident",
         "See also https://www.monetdb.org/Documentation/SQLreference/Users"},
        {"CREATE VIEW",
-        "",
+        "Create a new view",
         "CREATE [ OR REPLACE ] VIEW qname [ column_list ] AS { 
query_expression | '(' query_expression ')' }\n"
         "[ WITH CHECK OPTION ]",
         "qname,column_list,query_expression",
@@ -850,7 +851,7 @@ SQLhelp sqlhelp2[] = {
         NULL},
        {"trigger_reference",
         NULL,
-        "OLD [ROW] [AS] ident | NEW [ROW] [AS] ident",
+        "{ OLD | NEW } { [ROW] | TABLE } [AS] ident",
         NULL,
         NULL},
        {"update_statement",
@@ -860,8 +861,9 @@ SQLhelp sqlhelp2[] = {
         NULL},
        {"triggered_action",
         NULL,
-        "[ FOR EACH { ROW | STATEMENT } ] [ WHEN '(' search_condition ')'\n"
-        "        BEGIN ATOMIC trigger_statement ... END ",
+        "[ FOR [EACH] { ROW | STATEMENT } ]\n"
+        "[ WHEN '(' search_condition ')' ]\n"
+        "{ trigger_statement | BEGIN ATOMIC trigger_statement [ ; ... ] END }",
         "trigger_statement,search_condition",
         NULL},
        {"trigger_statement",
diff --git a/clients/mapiclient/msqldump.c b/clients/mapiclient/msqldump.c
--- a/clients/mapiclient/msqldump.c
+++ b/clients/mapiclient/msqldump.c
@@ -226,11 +226,15 @@ main(int argc, char **argv)
                dump_version(mid, out, "-- server:");
                mnstr_printf(out, "-- %s\n", buf);
        }
-       if (functions)
+       if (functions) {
+               mnstr_printf(out, "START TRANSACTION;\n");
                c = dump_functions(mid, out, true, NULL, NULL, NULL);
-       else if (table)
+               mnstr_printf(out, "COMMIT;\n");
+       } else if (table) {
+               mnstr_printf(out, "START TRANSACTION;\n");
                c = dump_table(mid, NULL, table, out, describe, true, 
useinserts, false);
-       else
+               mnstr_printf(out, "COMMIT;\n");
+       } else
                c = dump_database(mid, out, describe, useinserts);
        mnstr_flush(out);
 
diff --git a/common/utils/mutils.c b/common/utils/mutils.c
--- a/common/utils/mutils.c
+++ b/common/utils/mutils.c
@@ -25,10 +25,10 @@
 #include <limits.h>            /* PATH_MAX on Solaris */
 
 #ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>  /* realpath on OSX, prerequisite of sys/sysctl on 
OpenBSD */
+# include <sys/param.h>  /* realpath on OSX */
 #endif
 
-#ifdef HAVE_SYS_SYSCTL_H
+#ifdef BSD /* BSD macro is defined in sys/param.h */
 # include <sys/sysctl.h>  /* KERN_PROC_PATHNAME on BSD */
 #endif
 
@@ -454,7 +454,7 @@ get_bin_path(void)
        if (_NSGetExecutablePath(buf, &size) == 0 &&
                        realpath(buf, _bin_path) != NULL)
        return _bin_path;
-#elif defined(HAVE_SYS_SYSCTL_H) && defined(KERN_PROC_PATHNAME)  /* BSD */
+#elif defined(BSD) && defined(KERN_PROC_PATHNAME)  /* BSD */
        int mib[4];
        size_t cb = sizeof(_bin_path);
        mib[0] = CTL_KERN;
diff --git a/gdk/gdk_posix.c b/gdk/gdk_posix.c
--- a/gdk/gdk_posix.c
+++ b/gdk/gdk_posix.c
@@ -34,7 +34,7 @@
 #ifdef HAVE_MACH_MACH_INIT_H
 # include <mach/mach_init.h>
 #endif
-#if defined(HAVE_KVM_H) && defined(HAVE_SYS_SYSCTL_H)
+#if defined(HAVE_KVM_H)
 # include <kvm.h>
 # include <sys/param.h>
 # include <sys/sysctl.h>
@@ -297,7 +297,7 @@ MT_getrss(void)
 
        if (task_info(task, TASK_BASIC_INFO_64, (task_info_t)&t_info, 
&t_info_count) != KERN_INVALID_POLICY)
                return t_info.resident_size;  /* bytes */
-#elif defined(HAVE_KVM_H) && defined(HAVE_SYS_SYSCTL_H)
+#elif defined(HAVE_KVM_H)
        /* get RSS on FreeBSD and NetBSD */
        struct kinfo_proc *ki;
        int ski = 1;
@@ -795,8 +795,7 @@ MT_mmap(const char *path, int mode, size
                (void) SetFileAttributes(path, FILE_ATTRIBUTE_NORMAL);
                h1 = CreateFile(path, mode0, mode1, &sa, OPEN_ALWAYS, mode2, 
NULL);
                if (h1 == INVALID_HANDLE_VALUE) {
-                       errno = winerror(GetLastError());
-                       GDKsyserror("MT_mmap: CreateFile('%s', %lu, %lu, &sa, 
%lu, %lu, NULL) failed\n",
+                       GDKwinerror("MT_mmap: CreateFile('%s', %lu, %lu, &sa, 
%lu, %lu, NULL) failed\n",
                                    path, mode0, mode1, (DWORD) OPEN_ALWAYS, 
mode2);
                        return NULL;
                }
@@ -804,8 +803,7 @@ MT_mmap(const char *path, int mode, size
 
        h2 = CreateFileMapping(h1, &sa, mode3, (DWORD) (((__int64) len >> 32) & 
LL_CONSTANT(0xFFFFFFFF)), (DWORD) (len & LL_CONSTANT(0xFFFFFFFF)), NULL);
        if (h2 == NULL) {
-               errno = winerror(GetLastError());
-               GDKsyserror("MT_mmap: CreateFileMapping(%p, &sa, %lu, %lu, %lu, 
NULL) failed\n",
+               GDKwinerror("MT_mmap: CreateFileMapping(%p, &sa, %lu, %lu, %lu, 
NULL) failed\n",
                            h1, mode3,
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to