summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2007-06-20 04:06:02 +0000
committerKen Raeburn <raeburn@mit.edu>2007-06-20 04:06:02 +0000
commit713e3b94e537b25e4f7de8b9c8a10a8feaa523c3 (patch)
tree074d97b323735ffd2059f376eddbab515f0befc5 /src/plugins
parentf2242c5afab67a2b594d1ad31de99fcb2d7f6a48 (diff)
We have code elsewhere that assumes the existence of memmove and
strerror, and it builds everywhere we care about. So punt the substitute versions and everything else from libdb2/clib. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19602 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/kdb/db2/Makefile.in3
-rw-r--r--src/plugins/kdb/db2/libdb2/Makefile.in4
-rw-r--r--src/plugins/kdb/db2/libdb2/clib/Makefile.in13
-rw-r--r--src/plugins/kdb/db2/libdb2/clib/memmove.c142
-rw-r--r--src/plugins/kdb/db2/libdb2/clib/strerror.c71
-rw-r--r--src/plugins/kdb/db2/libdb2/configure.in14
6 files changed, 4 insertions, 243 deletions
diff --git a/src/plugins/kdb/db2/Makefile.in b/src/plugins/kdb/db2/Makefile.in
index 84511a3641..ecb4867bc9 100644
--- a/src/plugins/kdb/db2/Makefile.in
+++ b/src/plugins/kdb/db2/Makefile.in
@@ -48,8 +48,7 @@ DBDIR = libdb2
DBOBJLISTS = $(DBOBJLISTS-@DB_VERSION@)
DBOBJLISTS-sys =
DBOBJLISTS-k5 = $(DBDIR)/hash/OBJS.ST $(DBDIR)/btree/OBJS.ST \
- $(DBDIR)/db/OBJS.ST $(DBDIR)/mpool/OBJS.ST $(DBDIR)/recno/OBJS.ST \
- $(DBDIR)/clib/OBJS.ST
+ $(DBDIR)/db/OBJS.ST $(DBDIR)/mpool/OBJS.ST $(DBDIR)/recno/OBJS.ST
DBSHOBJLISTS = $(DBOBJLISTS:.ST=.SH)
SRCS= \
diff --git a/src/plugins/kdb/db2/libdb2/Makefile.in b/src/plugins/kdb/db2/libdb2/Makefile.in
index 83a1180f3f..2b4344d879 100644
--- a/src/plugins/kdb/db2/libdb2/Makefile.in
+++ b/src/plugins/kdb/db2/libdb2/Makefile.in
@@ -2,13 +2,13 @@ thisconfigdir=.
myfulldir=plugins/kdb/db2/libdb2
mydir=.
BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
-LOCAL_SUBDIRS=hash btree db mpool recno clib test
+LOCAL_SUBDIRS=hash btree db mpool recno test
LIBBASE=db
LIBMAJOR=1
LIBMINOR=1
STOBJLISTS=hash/OBJS.ST btree/OBJS.ST db/OBJS.ST mpool/OBJS.ST \
- recno/OBJS.ST clib/OBJS.ST
+ recno/OBJS.ST
SUBDIROBJLISTS=$(STOBJLISTS)
RELDIR=../plugins/kdb/db2/libdb2
diff --git a/src/plugins/kdb/db2/libdb2/clib/Makefile.in b/src/plugins/kdb/db2/libdb2/clib/Makefile.in
deleted file mode 100644
index 7c43c6dc56..0000000000
--- a/src/plugins/kdb/db2/libdb2/clib/Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
-thisconfigdir=./..
-myfulldir=plugins/kdb/db2/libdb2/clib
-mydir=clib
-BUILDTOP=$(REL)..$(S)..$(S)..$(S)..$(S)..
-STLIBOBJS=@MEMMOVE_OBJ@ @STRERROR_OBJ@
-
-LOCALINCLUDES=-I../include
-
-AUTOCONF_HEADER=$(srcdir)/../include/config.h.in
-
-all-unix:: all-libobjs
-clean-unix:: clean-libobjs
-@libobj_frag@
diff --git a/src/plugins/kdb/db2/libdb2/clib/memmove.c b/src/plugins/kdb/db2/libdb2/clib/memmove.c
deleted file mode 100644
index f9bf650a38..0000000000
--- a/src/plugins/kdb/db2/libdb2/clib/memmove.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Chris Torek.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bcopy.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <string.h>
-
-/*
- * sizeof(word) MUST BE A POWER OF TWO
- * SO THAT wmask BELOW IS ALL ONES
- */
-typedef int word; /* "word" used for optimal copy speed */
-
-#define wsize sizeof(word)
-#define wmask (wsize - 1)
-
-/*
- * Copy a block of memory, handling overlap.
- * This is the routine that actually implements
- * (the portable versions of) bcopy, memcpy, and memmove.
- */
-#ifdef MEMCOPY
-void *
-memcpy(dst0, src0, length)
-#else
-#ifdef MEMMOVE
-void *
-memmove(dst0, src0, length)
-#else
-void
-bcopy(src0, dst0, length)
-#endif
-#endif
- void *dst0;
- const void *src0;
- register size_t length;
-{
- register char *dst = dst0;
- register const char *src = src0;
- register size_t t;
-
- if (length == 0 || dst == src) /* nothing to do */
- goto done;
-
- /*
- * Macros: loop-t-times; and loop-t-times, t>0
- */
-#define TLOOP(s) if (t) TLOOP1(s)
-#define TLOOP1(s) do { s; } while (--t)
-
- if ((unsigned long)dst < (unsigned long)src) {
- /*
- * Copy forward.
- */
- t = (int)src; /* only need low bits */
- if ((t | (int)dst) & wmask) {
- /*
- * Try to align operands. This cannot be done
- * unless the low bits match.
- */
- if ((t ^ (int)dst) & wmask || length < wsize)
- t = length;
- else
- t = wsize - (t & wmask);
- length -= t;
- TLOOP1(*dst++ = *src++);
- }
- /*
- * Copy whole words, then mop up any trailing bytes.
- */
- t = length / wsize;
- TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize);
- t = length & wmask;
- TLOOP(*dst++ = *src++);
- } else {
- /*
- * Copy backwards. Otherwise essentially the same.
- * Alignment works as before, except that it takes
- * (t&wmask) bytes to align, not wsize-(t&wmask).
- */
- src += length;
- dst += length;
- t = (int)src;
- if ((t | (int)dst) & wmask) {
- if ((t ^ (int)dst) & wmask || length <= wsize)
- t = length;
- else
- t &= wmask;
- length -= t;
- TLOOP1(*--dst = *--src);
- }
- t = length / wsize;
- TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src);
- t = length & wmask;
- TLOOP(*--dst = *--src);
- }
-done:
-#if defined(MEMCOPY) || defined(MEMMOVE)
- return (dst0);
-#else
- return;
-#endif
-}
diff --git a/src/plugins/kdb/db2/libdb2/clib/strerror.c b/src/plugins/kdb/db2/libdb2/clib/strerror.c
deleted file mode 100644
index 0a509f79f2..0000000000
--- a/src/plugins/kdb/db2/libdb2/clib/strerror.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <string.h>
-
-char *
-strerror(num)
- int num;
-{
- extern int sys_nerr;
- extern char *sys_errlist[];
-#define UPREFIX "Unknown error: "
- static char ebuf[40] = UPREFIX; /* 64-bit number + slop */
- register unsigned int errnum;
- register char *p, *t;
- char tmp[40];
-
- errnum = num; /* convert to unsigned */
- if (errnum < sys_nerr)
- return(sys_errlist[errnum]);
-
- /* Do this by hand, so we don't include stdio(3). */
- t = tmp;
- do {
- *t++ = "0123456789"[errnum % 10];
- } while (errnum /= 10);
- for (p = ebuf + sizeof(UPREFIX) - 1;;) {
- *p++ = *--t;
- if (t <= tmp)
- break;
- }
- return(ebuf);
-}
diff --git a/src/plugins/kdb/db2/libdb2/configure.in b/src/plugins/kdb/db2/libdb2/configure.in
index 10c3bd752a..6f27d36439 100644
--- a/src/plugins/kdb/db2/libdb2/configure.in
+++ b/src/plugins/kdb/db2/libdb2/configure.in
@@ -69,24 +69,12 @@ dnl sys/param.h for AIX 4.3.3 (actually sys/machine.h)
dnl There's also sys/endian.h on IRIX, but we already check _MIPSE{L,B}.
AC_C_CONST
-dnl checks for library functions
-AC_CHECK_FUNC(memmove, ,
-[MEMMOVE_OBJ=memmove.o
-AC_DEFINE(memmove, kdb2__memmove,[Define to kdb2__memmove to provide private memmove function])
-AC_DEFINE(MEMMOVE,1,[Define if memmove.o is compiled in])])
-AC_SUBST(MEMMOVE_OBJ)
-
AC_CHECK_FUNC(mkstemp, ,
[AC_DEFINE(mkstemp, krb5int_mkstemp,[Define to \`krb5int_mkstemp' to use private mkstemp function])])
-AC_CHECK_FUNC(strerror, ,
-[STRERROR_OBJ=strerror.o
-AC_DEFINE(strerror, kdb2__strerror,[Define to \`kdb2__strerror' to provide private strerror function])])
-AC_SUBST(STRERROR_OBJ)
-
KRB5_BUILD_LIBRARY
KRB5_BUILD_LIBOBJS
KRB5_BUILD_PROGRAM
KRB5_RUN_FLAGS
AC_CONFIG_FILES(include/generated.stmp:Makefile.in)
-V5_AC_OUTPUT_MAKEFILE(. hash btree db mpool recno clib test)
+V5_AC_OUTPUT_MAKEFILE(. hash btree db mpool recno test)