diff options
Diffstat (limited to 'src/backend/port/memcmp.c')
-rw-r--r-- | src/backend/port/memcmp.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/backend/port/memcmp.c b/src/backend/port/memcmp.c deleted file mode 100644 index f622eb587fb..00000000000 --- a/src/backend/port/memcmp.c +++ /dev/null @@ -1,36 +0,0 @@ -/*------------------------------------------------------------------------- - * - * memcmp.c - * compares memory bytes - * - * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * - * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/Attic/memcmp.c,v 1.2 2002/06/20 20:29:33 momjian Exp $ - * - * This file was taken from NetBSD and is used by SunOS because memcmp - * on that platform does not properly compare negative bytes. - * - *------------------------------------------------------------------------- - */ - -#include <string.h> - -/* - * Compare memory regions. - */ -int -memcmp(const void *s1, const void *s2, size_t n) -{ - if (n != 0) { - const unsigned char *p1 = s1, *p2 = s2; - - do { - if (*p1++ != *p2++) - return (*--p1 - *--p2); - } while (--n != 0); - } - return 0; -} |