Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
build problem on OpenBSD 2.6
- X-seq: zsh-workers 11021
- From: Tanaka Akira <akr@xxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: build problem on OpenBSD 2.6
- Date: 30 Apr 2000 13:39:02 +0900
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
On OpenBSD 2.6, zsh-3.1.7-pre-1 is failed to build.
...
gcc -c -I. -DHAVE_CONFIG_H -DMODULE -Wall -Wno-implicit -Wmissing-prototypes -O2 -fpic -o zftp..o zftp.c
In file included from /usr/include/netdb.h:75,
from zftp.c:57:
/usr/include/sys/param.h:182: warning: `isset' redefined
../../Src/zsh.h:1438: warning: this is the location of the previous definition
zftp.c:571: macro `isset' used with just one arg
zftp.c:1717: macro `isset' used with just one arg
zftp.c:1732: macro `isset' used with just one arg
*** Error code 1
This is because /usr/include/sys/param.h defines isset as following,
/usr/include/sys/param.h:182: #define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
and zsh.h is included *before* param.h. If zsh.h is included *after*
param.h, there should be no problem because zsh.h undefine isset
before defining. So I tried to move #include "zftp.mdh" and
"zftp.pro"' to after including sytem headers as:
(sys/types.h is needed for sys/socket.h.)
| --- zftp.c.0 Sun Apr 30 21:52:51 2000
| +++ zftp.c Sun Apr 30 21:57:20 2000
| @@ -50,9 +50,7 @@
| struct zftp_session;
| typedef struct zftp_session *Zftp_session;
|
| -#include "zftp.mdh"
| -#include "zftp.pro"
| -
| +#include <sys/types.h>
| #include <sys/socket.h>
| #include <netdb.h>
| #include <netinet/in_systm.h>
| @@ -61,6 +59,9 @@
| #include <arpa/inet.h>
| /* it's a TELNET based protocol, but don't think I like doing this */
| #include <arpa/telnet.h>
| +
| +#include "zftp.mdh"
| +#include "zftp.pro"
|
| /*
| * We use poll() in preference to select because some subset of manuals says
But this causes another problem.
gcc -c -I. -DHAVE_CONFIG_H -DMODULE -Wall -Wno-implicit -Wmissing-prototypes -O2 -fpic -o zftp..o zftp.c
In file included from ../../Src/zsh.mdh:16,
from zftp.mdh:15,
from zftp.c:63:
../../Src/zsh.h:212: syntax error before `253'
...
Because /usr/include/arpa/telnet.h defines `DO' as a macro and zsh.h
defined `DO' as enum symbol.
/usr/include/arpa/telnet.h:47:
#define DO 253 /* please, you use option */
zsh.h:212:
DO, /* do */
So, finally I succeed to compile zsh with following modification, but
I think this is bit ugly.
| --- zftp.c.0 Sun Apr 30 21:52:51 2000
| +++ zftp.c Sun Apr 30 22:11:05 2000
| @@ -50,15 +50,17 @@
| struct zftp_session;
| typedef struct zftp_session *Zftp_session;
|
| -#include "zftp.mdh"
| -#include "zftp.pro"
| -
| +#include <sys/types.h>
| #include <sys/socket.h>
| #include <netdb.h>
| #include <netinet/in_systm.h>
| #include <netinet/in.h>
| #include <netinet/ip.h>
| #include <arpa/inet.h>
| +
| +#include "zftp.mdh"
| +#include "zftp.pro"
| +
| /* it's a TELNET based protocol, but don't think I like doing this */
| #include <arpa/telnet.h>
|
--
Tanaka Akira
Messages sorted by:
Reverse Date,
Date,
Thread,
Author