summaryrefslogtreecommitdiffstats
path: root/contrib/ltree/crc32.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:19:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:19:15 +0000
commit6eb9c5a5657d1fe77b55cc261450f3538d35a94d (patch)
tree657d8194422a5daccecfd42d654b8a245ef7b4c8 /contrib/ltree/crc32.h
parentInitial commit. (diff)
downloadpostgresql-13-6eb9c5a5657d1fe77b55cc261450f3538d35a94d.tar.xz
postgresql-13-6eb9c5a5657d1fe77b55cc261450f3538d35a94d.zip
Adding upstream version 13.4.upstream/13.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--contrib/ltree/crc32.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/ltree/crc32.h b/contrib/ltree/crc32.h
new file mode 100644
index 0000000..9588122
--- /dev/null
+++ b/contrib/ltree/crc32.h
@@ -0,0 +1,12 @@
+#ifndef _CRC32_H
+#define _CRC32_H
+
+/* contrib/ltree/crc32.h */
+
+/* Returns crc32 of data block */
+extern unsigned int ltree_crc32_sz(const char *buf, int size);
+
+/* Returns crc32 of null-terminated string */
+#define crc32(buf) ltree_crc32_sz((buf),strlen(buf))
+
+#endif