From 7ddbf09cb066d3384693a8487338f153bc679dcc Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Sat, 1 Jul 2000 15:33:04 +0000 Subject: [PATCH] * clib/strerror.c: #include config.h * clib/mkstemp.c: #include config.h. * clib/memmove.c: #include config.h. * clib/Makefile.in (LOCALINCLUDES): Add -I../include to get config.h. * configure.in: Generate two config headers, one for internal use and one for external use. Rework clib replacement code to use AC_DEFINE rather than ADD_DEF. * Makefile.in (STOBJLISTS): Add clib. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12505 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/db2/ChangeLog | 17 +++++++++++++++++ src/util/db2/Makefile.in | 2 +- src/util/db2/clib/Makefile.in | 2 ++ src/util/db2/clib/memmove.c | 4 ++++ src/util/db2/clib/mkstemp.c | 4 ++++ src/util/db2/clib/strerror.c | 4 ++++ src/util/db2/configure.in | 23 +++++++++++------------ 7 files changed, 43 insertions(+), 13 deletions(-) diff --git a/src/util/db2/ChangeLog b/src/util/db2/ChangeLog index 937a35256..85f711094 100644 --- a/src/util/db2/ChangeLog +++ b/src/util/db2/ChangeLog @@ -1,3 +1,20 @@ +2000-07-01 Tom Yu + + * clib/strerror.c: #include config.h. + + * clib/mkstemp.c: #include config.h. + + * clib/memmove.c: #include config.h. + + * clib/Makefile.in (LOCALINCLUDES): Add -I../include to get + config.h. + + * configure.in: Generate two config headers, one for internal use + and one for external use. Rework clib replacement code to use + AC_DEFINE rather than ADD_DEF. + + * Makefile.in (STOBJLISTS): Add clib. + 2000-06-30 Tom Yu * configure.in: Rework to use krb5 build system. diff --git a/src/util/db2/Makefile.in b/src/util/db2/Makefile.in index 1963d54ad..f01352441 100644 --- a/src/util/db2/Makefile.in +++ b/src/util/db2/Makefile.in @@ -8,7 +8,7 @@ LIB=db LIBMAJOR=1 LIBMINOR=0 STOBJLISTS=hash/OBJS.ST btree/OBJS.ST db/OBJS.ST mpool/OBJS.ST \ - recno/OBJS.ST + recno/OBJS.ST clib/OBJS.ST RELDIR=../util/db2 HDRDIR=$(BUILDTOP)/include diff --git a/src/util/db2/clib/Makefile.in b/src/util/db2/clib/Makefile.in index 9850a7d4d..37768aa67 100644 --- a/src/util/db2/clib/Makefile.in +++ b/src/util/db2/clib/Makefile.in @@ -4,5 +4,7 @@ mydir=clib BUILDTOP=$(REL)$(U)$(S)$(U)$(S)$(U) STLIBOBJS=@MEMMOVE_OBJ@ @MKSTEMP_OBJ@ @STRERROR_OBJ@ +LOCALINCLUDES=-I../include + all-unix:: all-libobjs clean-unix:: clean-libobjs diff --git a/src/util/db2/clib/memmove.c b/src/util/db2/clib/memmove.c index e8384f7c8..f9bf650a3 100644 --- a/src/util/db2/clib/memmove.c +++ b/src/util/db2/clib/memmove.c @@ -38,6 +38,10 @@ 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 /* diff --git a/src/util/db2/clib/mkstemp.c b/src/util/db2/clib/mkstemp.c index 89251104a..5b24b01a1 100644 --- a/src/util/db2/clib/mkstemp.c +++ b/src/util/db2/clib/mkstemp.c @@ -35,6 +35,10 @@ static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/src/util/db2/clib/strerror.c b/src/util/db2/clib/strerror.c index 53f374bdf..0a509f79f 100644 --- a/src/util/db2/clib/strerror.c +++ b/src/util/db2/clib/strerror.c @@ -35,6 +35,10 @@ 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 char * diff --git a/src/util/db2/configure.in b/src/util/db2/configure.in index c61a8fbfd..ddda65497 100644 --- a/src/util/db2/configure.in +++ b/src/util/db2/configure.in @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(db/db.c) -AC_CONFIG_HEADER(include/db-config.h) +AC_CONFIG_HEADER(include/config.h include/db-config.h) CONFIG_RULES AC_PATH_PROG(FALSE,false,:) @@ -68,22 +68,21 @@ AC_C_CONST AC_CHECK_SIZEOF(int) dnl checks for library functions -AC_CHECK_FUNC(memmove,, +AC_CHECK_FUNC(memmove, , [MEMMOVE_OBJ=memmove.o -ADD_DEF(-Dmemmove=kdb2__memmove) -ADD_DEF(-DMEMMOVE)]) +AC_DEFINE(memmove, kdb2__memmove) +AC_DEFINE(MEMMOVE)]) +AC_SUBST(MEMMOVE_OBJ) -AC_CHECK_FUNC(mkstemp,, +AC_CHECK_FUNCS(mkstemp, , [MKSTEMP_OBJ=mkstemp.o -ADD_DEF(-Dmkstemp=kdb2__mkstemp)]) -AC_CHECK_FUNC(strerror,, -[STRERROR_OBJ=strerror.o -ADD_DEF(-Dstrerror=kdb2__strerror)]) - -AC_SUBST(MEMMOVE_OBJ) +AC_DEFINE(mkstemp, kdb2__mkstemp)]) AC_SUBST(MKSTEMP_OBJ) + +AC_CHECK_FUNCS(strerror, , +[STRERROR_OBJ=strerror.o +AC_DEFINE(strerror, kdb2__strerror)]) AC_SUBST(STRERROR_OBJ) -AC_CHECK_FUNCS(memmove mkstemp strerror) KRB5_BUILD_LIBRARY KRB5_BUILD_LIBOBJS -- 2.26.2