Changeset: d64efedb3f7f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d64efedb3f7f
Modified Files:
        monetdb5/modules/mal/pp_hash.c
        sql/server/rel_optimize_sel.c
Branch: manti
Log Message:

merged from default


diffs (truncated from 6550 to 300 lines):

diff --git a/.clang-format b/.clang-format
--- a/.clang-format
+++ b/.clang-format
@@ -22,7 +22,27 @@ AllowShortIfStatementsOnASingleLine: Nev
 AllowShortLoopsOnASingleLine: false
 # clang-format 23: AllowShortRecordOnASingleLine: Never
 AlwaysBreakBeforeMultilineStrings: false
-AttributeMacros: [_In_z_, _Printf_format_string_]
+AttributeMacros:
+  - _Printf_format_string_
+  - ATTR_ACCESS
+  - ATTR_ALIGNED
+  - ATTR_ALLOC_SIZE
+  - ATTR_COLD
+  - ATTR_CONST
+  - ATTR_COUNTED_BY
+  - ATTR_DESIGNATED_INIT
+  - ATTR_FORMAT
+  - ATTR_MALLOC
+  - ATTR_MALLOC_ARGS
+  - ATTR_NOINLINE
+  - ATTR_NONNULL
+  - ATTR_NONNULL_IF_NONZERO
+  - ATTR_NONSTRING
+  - ATTR_PURE
+  - ATTR_RETURNS_NONNULL
+  - ATTR_SENTINEL
+  - ATTR_VISIBILITY_HIDDEN
+  - ATTR_WARN_UNUSED_RESULT
 BinPackArguments: true
 BinPackParameters: BinPack
 BitFieldColonSpacing: None
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
@@ -287,7 +287,7 @@ gdk_return GDKcreatedir(const char *nme)
 ATOMIC_TYPE GDKdebug;
 bool GDKembedded(void);
 bool GDKexiting(void);
-_Noreturn void GDKfatal(_In_z_ _Printf_format_string_ const char *format, ...);
+_Noreturn void GDKfatal(_Printf_format_string_ const char *format, ...);
 jmp_buf GDKfataljump;
 bool GDKfataljumpenable;
 char *GDKfatalmsg;
@@ -337,7 +337,7 @@ gdk_return GDKtoupper(allocator *ma, cha
 gdk_return GDKtracer_fill_comp_info(BAT *id, BAT *component, BAT *log_level);
 gdk_return GDKtracer_flush_buffer(void);
 const char *GDKtracer_get_component_level(const char *comp);
-void GDKtracer_log(const char *file, const char *func, int lineno, log_level_t 
lvl, component_t comp, const char *syserr, _In_z_ _Printf_format_string_ const 
char *format, ...);
+void GDKtracer_log(const char *file, const char *func, int lineno, log_level_t 
lvl, component_t comp, const char *syserr, _Printf_format_string_ const char 
*format, ...);
 void GDKtracer_reinit_basic(int sig);
 gdk_return GDKtracer_reset_adapter(void);
 gdk_return GDKtracer_reset_component_level(const char *comp);
@@ -899,8 +899,8 @@ const char corrRef[];
 const char countRef[];
 const char count_no_nilRef[];
 int cpyConstant(MalBlkPtr mb, VarPtr vr);
-str createException(enum malexception, const char *, _In_z_ 
_Printf_format_string_ const char *, ...);
-str createMalException(MalBlkPtr, int, enum malexception, _In_z_ 
_Printf_format_string_ const char *, ...);
+str createException(enum malexception, const char *, _Printf_format_string_ 
const char *, ...);
+str createMalException(MalBlkPtr, int, enum malexception, 
_Printf_format_string_ const char *, ...);
 const char create_functionRef[];
 const char create_roleRef[];
 const char create_schemaRef[];
@@ -1651,7 +1651,7 @@ sql_rel *rel_project(allocator *sa, sql_
 list *rel_projections(mvc *sql, sql_rel *rel, const char *tname, int settname, 
int intern);
 void res_tables_destroy(res_table *results);
 list *sa_list(allocator *sa);
-char *sa_message(allocator *sa, _In_z_ _Printf_format_string_ const char 
*format, ...);
+char *sa_message(allocator *sa, _Printf_format_string_ const char *format, 
...);
 msettings *sa_msettings_create(allocator *sa);
 char *sa_msettings_to_string(const msettings *mp, allocator *sa, size_t 
size_hint);
 sql_type *schema_bind_type(mvc *sql, sql_schema *s, const char *name);
@@ -1739,7 +1739,7 @@ int mnstr_isalive(const stream *s);
 bool mnstr_isbinary(const stream *s);
 const char *mnstr_name(const stream *s);
 const char *mnstr_peek_error(const stream *s);
-int mnstr_printf(stream *restrict s, _In_z_ _Printf_format_string_ const char 
*restrict format, ...);
+int mnstr_printf(stream *restrict s, _Printf_format_string_ const char 
*restrict format, ...);
 int mnstr_putoob(stream *s, char val);
 ssize_t mnstr_read(stream *restrict s, void *restrict buf, size_t elmsize, 
size_t cnt);
 int mnstr_readBte(stream *restrict s, int8_t *restrict val);
@@ -1757,7 +1757,7 @@ int mnstr_readStr(stream *restrict s, ch
 ssize_t mnstr_read_block(stream *restrict s, void *restrict buf, size_t 
elmsize, size_t cnt);
 ssize_t mnstr_readline(stream *restrict s, void *restrict buf, size_t maxcnt);
 void mnstr_set_bigendian(stream *s, bool bigendian);
-void mnstr_set_error(stream *s, mnstr_error_kind kind, _In_z_ 
_Printf_format_string_ const char *fmt, ...);
+void mnstr_set_error(stream *s, mnstr_error_kind kind, _Printf_format_string_ 
const char *fmt, ...);
 void mnstr_settimeout(stream *s, unsigned int ms, bool (*func)(void *), void 
*data);
 const char *mnstr_version(void);
 ssize_t mnstr_write(stream *restrict s, const void *restrict buf, size_t 
elmsize, size_t cnt);
diff --git a/clients/examples/C/bincopydata.h b/clients/examples/C/bincopydata.h
--- a/clients/examples/C/bincopydata.h
+++ b/clients/examples/C/bincopydata.h
@@ -12,8 +12,8 @@
 #include "copybinary.h"
 #include "copybinary_support.h"
 
-_Noreturn void croak(int status, _In_z_ _Printf_format_string_ const char 
*msg, ...)
-       __attribute__((__format__(__printf__, 2, 3)));
+_Noreturn void croak(int status, _Printf_format_string_ const char *msg, ...)
+       ATTR_FORMAT(__printf__, 2, 3);
 
 void gen_decimal_tinyints(FILE *f, bool byteswap, long nrecs, char *arg);
 void gen_decimal_smallints(FILE *f, bool byteswap, long nrecs, char *arg);
diff --git a/clients/examples/C/streamcat.c b/clients/examples/C/streamcat.c
--- a/clients/examples/C/streamcat.c
+++ b/clients/examples/C/streamcat.c
@@ -78,9 +78,9 @@ static void copy_file_to_stream(FILE *in
 /* Format the message and write it to stderr. Then exit with the given status.
  * If status is 1, include USAGE in the message.
  */
-__attribute__((__format__(__printf__, 2, 3)))
+ATTR_FORMAT(__printf__, 2, 3)
 _Noreturn static void
-croak(int status, _In_z_ _Printf_format_string_ const char *msg, ...)
+croak(int status, _Printf_format_string_ const char *msg, ...)
 {
        va_list ap;
 
diff --git a/clients/mapilib/mapi.h b/clients/mapilib/mapi.h
--- a/clients/mapilib/mapi.h
+++ b/clients/mapilib/mapi.h
@@ -68,29 +68,35 @@ extern "C" {
 #endif
 
 /* Does your compiler support `__attribute__' extension? */
-#if !defined(__has_attribute)
-#ifndef __attribute__
-#define __attribute__(...)
+#if defined(__has_attribute)
+#if __has_attribute(__const__)
+#define ATTR_CONST                     __attribute__((__const__))
+#endif
+#if __has_attribute(__nonnull__)
+#define ATTR_NONNULL(...)              
__attribute__((__nonnull__(__VA_ARGS__)))
 #endif
-#else
-#if !__has_attribute(__nonnull__)
-#define __nonnull__(...)
 #endif
+
+#ifndef ATTR_CONST
+#define ATTR_CONST
+#endif
+#ifndef ATTR_NONNULL
+#define ATTR_NONNULL(...)
 #endif
 
 /* connection-oriented functions */
 mapi_export Mapi mapi_mapi(const char *host, int port, const char *username, 
const char *password, const char *lang, const char *dbname);
 mapi_export Mapi mapi_mapiuri(const char *url, const char *user, const char 
*pass, const char *lang);
 mapi_export MapiMsg mapi_destroy(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export Mapi mapi_connect(const char *host, int port, const char 
*username, const char *password, const char *lang, const char *dbname);
 mapi_export char **mapi_resolve(const char *host, int port, const char 
*pattern);
 mapi_export MapiMsg mapi_disconnect(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_reconnect(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_ping(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export void mapi_setfilecallback2(
        Mapi mid,
        char *(*getfunc)(void *priv, const char *filename,
@@ -98,7 +104,7 @@ mapi_export void mapi_setfilecallback2(
        char *(*putfunc)(void *priv, const char *filename, bool binary,
                         const void *data, size_t size),
        void *priv)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export void mapi_setfilecallback(
        Mapi mid,
        char *(*getfunc)(void *priv, const char *filename,
@@ -106,187 +112,187 @@ mapi_export void mapi_setfilecallback(
        char *(*putfunc)(void *priv, const char *filename,
                         const void *data, size_t size),
        void *priv)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export void mapi_setclientprefix(Mapi mid, const char *prefix);
 
 mapi_export MapiMsg mapi_error(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export const char *mapi_error_str(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export void mapi_noexplain(Mapi mid, const char *errorprefix)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export void mapi_explain(Mapi mid, FILE *fd)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export void mapi_explain_query(MapiHdl hdl, FILE *fd)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export void mapi_explain_result(MapiHdl hdl, FILE *fd);
 mapi_export void mapi_trace(Mapi mid, bool flag)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 #ifdef _STREAM_H_              /* if stream.h was included */
 mapi_export stream *mapi_get_from(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export stream *mapi_get_to(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 #endif
 mapi_export bool mapi_get_trace(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export int mapi_get_time_zone(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export bool mapi_get_autocommit(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export bool mapi_get_columnar_protocol(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_log(Mapi mid, const char *nme)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_set_time_zone(Mapi mid, int seconds_east_of_utc)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_setAutocommit(Mapi mid, bool autocommit)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_set_columnar_protocol(Mapi mid, bool 
columnar_protocol)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_set_size_header(Mapi mid, bool value)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_release_id(Mapi mid, int id)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export const char *mapi_result_error(MapiHdl hdl);
 mapi_export const char *mapi_result_errorcode(MapiHdl hdl);
 mapi_export MapiMsg mapi_next_result(MapiHdl hdl)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_needmore(MapiHdl hdl)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export bool mapi_more_results(MapiHdl hdl)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiHdl mapi_new_handle(Mapi mid)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_close_handle(MapiHdl hdl);
 mapi_export MapiMsg mapi_bind(MapiHdl hdl, int fnr, char **ptr)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_bind_var(MapiHdl hdl, int fnr, int type, void *ptr)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_bind_numeric(MapiHdl hdl, int fnr, int scale, int 
precision, void *ptr)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_clear_bindings(MapiHdl hdl)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_param_type(MapiHdl hdl, int fnr, int ctype, int 
sqltype, void *ptr)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_param_string(MapiHdl hdl, int fnr, int sqltype, char 
*ptr, int *sizeptr)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_param(MapiHdl hdl, int fnr, char **ptr)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_param_numeric(MapiHdl hdl, int fnr, int scale, int 
precision, void *ptr)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_clear_params(MapiHdl hdl)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiHdl mapi_prepare(Mapi mid, const char *cmd)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_prepare_handle(MapiHdl hdl, const char *cmd)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_execute(MapiHdl hdl)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_fetch_reset(MapiHdl hdl)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
 mapi_export MapiMsg mapi_finish(MapiHdl hdl)
-       __attribute__((__nonnull__(1)));
+       ATTR_NONNULL(1);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to