summaryrefslogtreecommitdiff
path: root/contrib/ltree/crc32.h
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-07-30 16:40:34 +0000
committerBruce Momjian <bruce@momjian.us>2002-07-30 16:40:34 +0000
commit1dedbf2da5c4aa741bbc6f16dc3ad819625b84f0 (patch)
treef13fc1d640627603e486fc965f18529f85a40500 /contrib/ltree/crc32.h
parent210e64fe085cf780ea49867ef00c24cc86386aa2 (diff)
downloadpostgresql-1dedbf2da5c4aa741bbc6f16dc3ad819625b84f0.tar.gz
Add ltree data type to contrib, from Teodor Sigaev and Oleg Bartunov.
Diffstat (limited to 'contrib/ltree/crc32.h')
-rw-r--r--contrib/ltree/crc32.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/ltree/crc32.h b/contrib/ltree/crc32.h
new file mode 100644
index 0000000000..97254a4a90
--- /dev/null
+++ b/contrib/ltree/crc32.h
@@ -0,0 +1,10 @@
+#ifndef _CRC32_H
+#define _CRC32_H
+
+/* Returns crc32 of data block */
+extern unsigned int crc32_sz(char *buf, int size);
+
+/* Returns crc32 of null-terminated string */
+#define crc32(buf) crc32_sz((buf),strlen(buf))
+
+#endif