summaryrefslogtreecommitdiff
path: root/db2/common/db_byteorder.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-01-02 06:01:06 +0000
committerUlrich Drepper <drepper@redhat.com>2000-01-02 06:01:06 +0000
commit8d6f1731fcd082e4f744ba9cb4bde4be7c08f1b3 (patch)
tree099a250d7366aef2ab028fdb24f0d692cd784b4a /db2/common/db_byteorder.c
parent9a6450d578556c11e7c173d2f28362345b8f1258 (diff)
Update.
* Makeconfig (all-subdirs): Remove db and db2. * db/*: Removed. * db2/*: Removed.
Diffstat (limited to 'db2/common/db_byteorder.c')
-rw-r--r--db2/common/db_byteorder.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/db2/common/db_byteorder.c b/db2/common/db_byteorder.c
deleted file mode 100644
index cadf742851..0000000000
--- a/db2/common/db_byteorder.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * See the file LICENSE for redistribution information.
- *
- * Copyright (c) 1996, 1997, 1998
- * Sleepycat Software. All rights reserved.
- */
-
-#include "config.h"
-
-#ifndef lint
-static const char sccsid[] = "@(#)db_byteorder.c 10.5 (Sleepycat) 4/10/98";
-#endif /* not lint */
-
-#ifndef NO_SYSTEM_INCLUDES
-#include <sys/types.h>
-
-#ifdef HAVE_ENDIAN_H
-#include <endian.h>
-#if BYTE_ORDER == BIG_ENDIAN
-#define WORDS_BIGENDIAN 1
-#endif
-#endif
-
-#include <errno.h>
-#endif
-
-#include "db_int.h"
-#include "common_ext.h"
-
-/*
- * __db_byteorder --
- * Return if we need to do byte swapping, checking for illegal
- * values.
- *
- * PUBLIC: int __db_byteorder __P((DB_ENV *, int));
- */
-int
-__db_byteorder(dbenv, lorder)
- DB_ENV *dbenv;
- int lorder;
-{
- switch (lorder) {
- case 0:
- break;
- case 1234:
-#if defined(WORDS_BIGENDIAN)
- return (DB_SWAPBYTES);
-#else
- break;
-#endif
- case 4321:
-#if defined(WORDS_BIGENDIAN)
- break;
-#else
- return (DB_SWAPBYTES);
-#endif
- default:
- __db_err(dbenv,
- "illegal byte order, only big and little-endian supported");
- return (EINVAL);
- }
- return (0);
-}