projects
/
smlar.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f2522d5
)
fix gotchas with pg 16&17
master
author
Teodor Sigaev
<teodor@sigaev.ru>
Sat, 28 Dec 2024 08:11:40 +0000
(11:11 +0300)
committer
Teodor Sigaev
<teodor@sigaev.ru>
Sat, 28 Dec 2024 08:11:40 +0000
(11:11 +0300)
smlar_gist.c
patch
|
blob
|
history
diff --git
a/smlar_gist.c
b/smlar_gist.c
index
480d744
..
a142a77
100644
(file)
--- a/
smlar_gist.c
+++ b/
smlar_gist.c
@@
-52,6
+52,10
@@
typedef char *BITVECP;
#define GETENTRY(vec,pos) ((SmlSign *) DatumGetPointer((vec)->vector[(pos)].key))
#define GETENTRY(vec,pos) ((SmlSign *) DatumGetPointer((vec)->vector[(pos)].key))
+#ifndef Abs
+#define Abs(x) abs(x)
+#endif
+
/*
* Fake IO
*/
/*
* Fake IO
*/
@@
-430,7
+434,7
@@
Datum
gsmlsign_decompress(PG_FUNCTION_ARGS)
{
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
gsmlsign_decompress(PG_FUNCTION_ARGS)
{
GISTENTRY *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
- SmlSign *key = (SmlSign*)
DatumGetPointer(PG_DETOAST_DATUM(entry->key)
);
+ SmlSign *key = (SmlSign*)
PG_DETOAST_DATUM(entry->key
);
if (key != (SmlSign *) DatumGetPointer(entry->key))
{
if (key != (SmlSign *) DatumGetPointer(entry->key))
{