From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18221 invoked from network); 30 Apr 2000 04:37:58 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Apr 2000 04:37:58 -0000 Received: (qmail 29960 invoked by alias); 30 Apr 2000 04:37:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11021 Received: (qmail 29934 invoked from network); 30 Apr 2000 04:37:46 -0000 To: zsh-workers@sunsite.auc.dk Subject: build problem on OpenBSD 2.6 MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 30 Apr 2000 13:39:02 +0900 Message-ID: User-Agent: T-gnus/6.14.1 (based on Gnus v5.8.3) (revision 16) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.6 (i686-pc-linux-gnu) MULE/4.0 (HANANOEN) 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 | #include | #include | #include | @@ -61,6 +59,9 @@ | #include | /* it's a TELNET based protocol, but don't think I like doing this */ | #include | + | +#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 | #include | #include | #include | #include | #include | #include | + | +#include "zftp.mdh" | +#include "zftp.pro" | + | /* it's a TELNET based protocol, but don't think I like doing this */ | #include | -- Tanaka Akira