Changeset: bd09d9ebf883 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bd09d9ebf883
Modified Files:
        gdk/gdk_atoms.c
Branch: int128
Log Message:

fixed hgeToStr: ABS() is built-in function on int (lng?), not a macro;
added HGE_ABS() marco instead.

Thanks to Niels for reminding me
that I forgot the check the *least likely* location, first !!!


diffs (21 lines):

diff --git a/gdk/gdk_atoms.c b/gdk/gdk_atoms.c
--- a/gdk/gdk_atoms.c
+++ b/gdk/gdk_atoms.c
@@ -748,7 +748,7 @@ atom_io(lng, Lng, lng)
 #define HGE_LL018FMT "%018lld"
 #endif
 #define HGE_LL18DIGITS LL_CONSTANT(1000000000000000000)
-
+#define HGE_ABS(a) (((a) < 0) ? -(a) : (a))
 int
 hgeToStr(char **dst, int *len, const hge *src)
 {
@@ -763,7 +763,7 @@ hgeToStr(char **dst, int *len, const hge
        } else {
                hge s = *src / HGE_LL18DIGITS;
                int l = hgeToStr(dst, len, &s);
-               snprintf(*dst + l, *len - l, HGE_LL018FMT, (lng) ABS(*src % 
HGE_LL18DIGITS));
+               snprintf(*dst + l, *len - l, HGE_LL018FMT, (lng) HGE_ABS(*src % 
HGE_LL18DIGITS));
                return (int) strlen(*dst);
        }
 }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to