* build problem on OpenBSD 2.6
@ 2000-04-30 4:39 Tanaka Akira
2000-05-09 11:53 ` Tanaka Akira
0 siblings, 1 reply; 2+ messages in thread
From: Tanaka Akira @ 2000-04-30 4:39 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: build problem on OpenBSD 2.6
2000-04-30 4:39 build problem on OpenBSD 2.6 Tanaka Akira
@ 2000-05-09 11:53 ` Tanaka Akira
0 siblings, 0 replies; 2+ messages in thread
From: Tanaka Akira @ 2000-05-09 11:53 UTC (permalink / raw)
To: zsh-workers
In article <hvog0s4w6c9.fsf@serein.m17n.org>,
Tanaka Akira <akr@m17n.org> writes:
> On OpenBSD 2.6, zsh-3.1.7-pre-1 is failed to build.
I found another problem on OpenBSD. --enable-zsh-debug can not used
because ld doesn't accept -g as NetBSD.
Although I think the patch for zftp.c is bit ugly, I'll commit this...
Index: configure.in
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.in,v
retrieving revision 1.8
diff -u -r1.8 configure.in
--- configure.in 2000/05/02 14:22:39 1.8
+++ configure.in 2000/05/09 11:44:01
@@ -316,7 +316,7 @@
fi
if test -n "$auto_ldflags"; then
case "${enable_zsh_debug}$host_os" in
- yesaix*|yeshpux*|yesnetbsd*) ;; # "ld -g" is not valid on these systems
+ yesaix*|yeshpux*|yesnetbsd*|yesopenbsd*) ;; # "ld -g" is not valid on these systems
yes*) LDFLAGS=-g ;;
*) LDFLAGS=-s ;;
esac
Index: Src/Modules/zftp.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zftp.c,v
retrieving revision 1.1.1.22
diff -u -r1.1.1.22 zftp.c
--- Src/Modules/zftp.c 2000/02/23 15:18:47 1.1.1.22
+++ Src/Modules/zftp.c 2000/05/09 11:44:02
@@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-05-09 11:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-30 4:39 build problem on OpenBSD 2.6 Tanaka Akira
2000-05-09 11:53 ` Tanaka Akira
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).