Re: compiling vmailmgr-0.97 on OpenBSD 3.8

Giam Teck Choon <[email protected]> Mon, 20 Feb 2006 07:15:08 +0800
Newsgroups gmane.mail.vmailmgr
Message-ID <[email protected]>
> * Greg <[email protected]> [20060129 00:14]:
> [...]
>  > bash-3.00# make check
>  > Making check in php
>  > Making check in lib
>  > Making check in misc
>  > g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I..    -g -O2 -fno-rtti 
> -fno-exceptions
>  > -Wall -c crc32.cc
> [...]
>  > g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I..    -g -O2 -fno-rtti 
> -fno-exceptions
>  > -Wall -c server.cc
>  > server.cc: In function `unsigned char* encode_string(unsigned char*,
>  > mystring)
>  >    ':
>  > server.cc:36: error: `memcpy' undeclared (first use this function)
>  > server.cc:36: error: (Each undeclared identifier is reported only 
> once for
>  > each
>  >    function it appears in.)
>  > server.cc: In member function `int server_call::connect(const mystring&)
>  > const
>  >    ':
>  > server.cc:82: error: `strcpy' undeclared (first use this function)
>  > server.cc:83: error: `strlen' undeclared (first use this function)
>  > *** Error code 1
>  >
>  > Stop in /usr/local/src/vmailmgr-0.97/lib/misc.
>  > *** Error code 1
>  >
>  > Stop in /usr/local/src/vmailmgr-0.97/lib (line 190 of Makefile).
>  > *** Error code 1
>  >
>  > Stop in /usr/local/src/vmailmgr-0.97 (line 177 of Makefile).
> 
> This one is because str{cpy,len} are not defined in stdlib.h but
> string.h on *BSD. Add a line like the following to the beggining of
> server.cc:
> 
> #include <string.h>
> 
> after this it fails for me like:
> 
> Making check in cdb++
> g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I..    -g -O2 -fno-rtti 
> -fno-exceptions -Wall -c datum.cc
> In file included from ../fdbuf/fdbuf.h:79,
>                  from datum.h:5,
>                  from datum.cc:17:
> ../fdbuf/fdobuf.h:53: error: expected `;' before '(' token
> 
> And I'm stumped here :(
> 
> qvb
> -- 
> pica

Try the following patches:

--- lib/fdbuf/fdbuf.h.orig      Mon Feb 20 01:21:46 2006
+++ lib/fdbuf/fdbuf.h   Mon Feb 20 01:23:45 2006
@@ -21,6 +21,8 @@
  #include "config.h"
  #include <string.h>
  #include <fcntl.h>
+#include <unistd.h>

  #ifdef _REENTRANT
  #include <pthread.h>

--- lib/misc/server.cc.orig     Mon Feb 20 01:07:16 2006
+++ lib/misc/server.cc  Mon Feb 20 01:07:32 2006
@@ -20,6 +20,7 @@
  #include <unistd.h>
  #include "un.h"
  #include "debug.h"
+#include <string.h>

  server_call::~server_call()
  {


--
Giam Teck Choon

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]