zsh-workers
 help / color / mirror / code / Atom feed
From: Tanaka Akira <akr@m17n.org>
To: zsh-workers@sunsite.auc.dk
Subject: build problem on OpenBSD 2.6
Date: 30 Apr 2000 13:39:02 +0900	[thread overview]
Message-ID: <hvog0s4w6c9.fsf@serein.m17n.org> (raw)

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


             reply	other threads:[~2000-04-30  4:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-30  4:39 Tanaka Akira [this message]
2000-05-09 11:53 ` Tanaka Akira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=hvog0s4w6c9.fsf@serein.m17n.org \
    --to=akr@m17n.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).