Im Falle von !NDEBUG (Debug builds) wird strlcpy nicht inline gemacht (gdb

stellt sich wieder mal Kacke an)
This commit is contained in:
Enno Rehling 2005-07-04 21:38:28 +00:00
parent 4b6cbc45c6
commit 6b1d86e5ae
3 changed files with 11 additions and 5 deletions

View File

@ -11,6 +11,7 @@ SEARCH_SOURCE +=
SOURCES =
attrib.c
base36.c
bsdstring.c
command.c
crmessage.c
cvector.c
@ -40,8 +41,4 @@ if $(MSPACES) {
SOURCES += <dl>malloc.c ;
}
if $(NO_INLINE) {
SOURCES += bsdstring.c ;
}
Library util : $(SOURCES) ;

View File

@ -2,6 +2,11 @@
#include <string.h>
#include "bsdstring.h"
#ifndef HAVE_INLINE
# undef INLINE_FUNCTION
# define INLINE_FUNCTION
#endif
#if !defined(HAVE_STRLCPY)
INLINE_FUNCTION size_t
strlcpy(char *dst, const char *src, size_t siz) /* copied from OpenBSD source code */

View File

@ -1,14 +1,18 @@
#ifndef UTIL_BSDSTRING_H
#define UTIL_BSDSTRING_H
#ifndef NDEBUG
# undef HAVE_INLINE
#endif
#if !defined(HAVE_STRLCPY)
# ifdef HAVE_INLINE
# include "bsdstring.c"
# define HAVE_STRLCPY
# else
extern size_t strlcpy(char *dst, const char *src, size_t siz);
extern size_t strlcat(char * dst, const char * src, size_t siz);
# endif
# define HAVE_STRLCPY
#endif
#if !defined(HAVE_STRLPRINTF)