summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-03-24 17:05:01 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-03-24 17:05:01 +0100
commit6035c9b23fc5445a9e95910b7c032876a1f4301c (patch)
treeaf81265733a32b52625319b50094a1bda0123a56 /include
parentc97627fdfca3a976ef7f3055339021967ca60f6d (diff)
downloadwolfbones-6035c9b23fc5445a9e95910b7c032876a1f4301c.tar.gz
wolfbones-6035c9b23fc5445a9e95910b7c032876a1f4301c.tar.bz2
fixed strlcpy and strlcat on NetBSD
Diffstat (limited to 'include')
-rw-r--r--include/wolf/log/log.h4
-rw-r--r--include/wolf/port/string.h8
-rw-r--r--include/wolf/port/sys.h4
3 files changed, 14 insertions, 2 deletions
diff --git a/include/wolf/log/log.h b/include/wolf/log/log.h
index 3ea748b..f656f53 100644
--- a/include/wolf/log/log.h
+++ b/include/wolf/log/log.h
@@ -18,10 +18,10 @@
#ifndef WOLF_LOG_H
#define WOLF_LOG_H
-#include <stdarg.h> /* for ap_list */
-
#include "port/stdbool.h"
+#include <stdarg.h> /* for ap_list */
+
/**
* @addtogroup wolf_log Logging
* @{
diff --git a/include/wolf/port/string.h b/include/wolf/port/string.h
index 0b79f2a..7875701 100644
--- a/include/wolf/port/string.h
+++ b/include/wolf/port/string.h
@@ -78,6 +78,10 @@ extern size_t wolf_port_strlcpy( char *d, const char *s, size_t bufsize );
#endif
#if !defined HAVE_STRLCPY
#define strlcpy( d, s, bufsize ) wolf_port_strlcpy( d, s, bufsize )
+#else
+#if defined MUST_DEFINE_STRLCPY_PROTOTYPE
+extern size_t strlcpy( char *d, const char *s, size_t bufsize );
+#endif
#endif
#if !defined HAVE_STRLCAT || defined TEST_STRLCAT
@@ -85,6 +89,10 @@ extern size_t wolf_port_strlcat( char *d, const char *s, size_t bufsize );
#endif
#if !defined HAVE_STRLCAT
#define strlcat( d, s, bufsize ) wolf_port_strlcat( d, s, bufsize )
+#else
+#if defined MUST_DEFINE_STRLCAT_PROTOTYPE
+extern size_t strlcat( char *d, const char *s, size_t bufsize );
+#endif
#endif
/** @} */ /* @addtogroup wolf_port */
diff --git a/include/wolf/port/sys.h b/include/wolf/port/sys.h
index 5fc883d..f395d90 100644
--- a/include/wolf/port/sys.h
+++ b/include/wolf/port/sys.h
@@ -129,6 +129,10 @@
#define HAVE_STRINGS_H
#define HAVE_SYSLOG_H
#define GETTEXT_NEEDS_FORMAT_ARG
+#define HAVE_STRLCPY
+#define MUST_DEFINE_STRLCPY_PROTOTYPE
+#define HAVE_STRLCAT
+#define MUST_DEFINE_STRLCAT_PROTOTYPE
#else
#error unknown platform
#endif /* defined OS_MINOR_VERSION == 2 */