More weird stuff

Julien ÉLIE julien at trigofacile.com
Tue Jan 27 22:14:35 UTC 2009


Hi Russ,

> The last time you posted your test suite results, it looked like you
> weren't getting prototypes for strlcat and strlcpy, which means the return
> values are going to be mangled.  I don't know off-hand anywhere in INN
> that uses the return values, but that's a bad sign.

I have just found out that link:

    http://archives.postgresql.org/pgsql-patches/2006-09/msg00307.php

"BSD/OS doesn't have a prototype for strlcpy() but has the function"

I do not know whether it is true, but the following patch silents the warnings:


Index: include/portable/setproctitle.h
===================================================================
--- include/portable/setproctitle.h     (révision 8297)
+++ include/portable/setproctitle.h     (copie de travail)
@@ -12,7 +12,7 @@

 #include "config.h"

-#if !HAVE_SETPROCTITLE
+#if !HAVE_SETPROCTITLE || defined(__bsdi__)
 void setproctitle(const char *format, ...);
 #endif

Index: include/clibrary.h
===================================================================
--- include/clibrary.h  (révision 8297)
+++ include/clibrary.h  (copie de travail)
@@ -135,10 +135,10 @@
 #if !HAVE_STRERROR
 extern const char *     strerror(int);
 #endif
-#if !HAVE_STRLCAT
+#if !HAVE_STRLCAT || defined(__bsdi__)
 extern size_t           strlcat(char *, const char *, size_t);
 #endif
-#if !HAVE_STRLCPY
+#if !HAVE_STRLCPY || defined(__bsdi__)
 extern size_t           strlcpy(char *, const char *, size_t);
 #endif
 #if !HAVE_SYMLINK




Should we also put other systems?




There is a problem during configure with sys/mount.h too.  This patch
seems to fix it:


Index: configure.ac
===================================================================
--- configure.ac        (révision 8297)
+++ configure.ac        (copie de travail)
@@ -484,7 +484,13 @@
 dnl Probe for the appropriate stat functions.
 AC_CHECK_FUNCS([statvfs], ,
     [AC_CHECK_FUNCS([statfs])
-     AC_CHECK_HEADERS([sys/vfs.h sys/param.h sys/mount.h])])
+     AC_CHECK_HEADERS([sys/vfs.h sys/mount.h])
+     AC_CHECK_HEADERS(sys/mount.h, [], [],
+         [#ifdef HAVE_SYS_PARAM_H
+          # include <sys/param.h>
+          #endif
+         ])
+    ])

-- 
Julien ÉLIE

« Persica, pira, poma, requirent uina bona. »




More information about the inn-workers mailing list