From: Wayne Davison <wayned@users.sourceforge.net>
To: Bart Schaefer <schaefer@candle.brasslantern.com>
Cc: <zsh-workers@sunsite.dk>
Subject: Re: PATCH: Re: Build Failures on SunOS-4.1 and 5.5
Date: Thu, 12 Apr 2001 15:29:55 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.30.0104121518110.32060-200000@phong.blorf.net> (raw)
In-Reply-To: <1010412162037.ZM32221@candle.brasslantern.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1222 bytes --]
On Thu, 12 Apr 2001, Bart Schaefer wrote:
> Ignoring my patch in 13962, which was the right fix for my local variant
> of Vin's symptoms but not for the actual bug report, here's the complete
> change:
Even with these changes, I can no longer build zsh under Solaris 2.6
(x86). The biggest problem is that you can't include term.h without
first including curses.h (since term.h needs the SGTTY macro defined).
So, I moved the include of curses.h into Sys/system.h, and had to put
it before the inclusion of termios.h (or else the sgtty structure
would not get completely defined). THEN, term.h defines several
lower-case macros that interfere with variable names in zsh, so I had
to undef "tab", "lines", and "columns". And if that weren't enough, I
had to change the name of the "move" function pointer in files.c
because curses.h defined a move() macro (though I suppose I could have
undef'ed that too). Finally, just to get rid of a superfluous warning,
I decided to make the supplemental function gethostbyname2() not be
defined "static" since Solaris actually defines the prototype for this
function but then doesn't seem to include it in a library anywhere.
I haven't checked this in yet. Comments?
..wayne..
[-- Attachment #2: Fixes for Solaris 2.6 --]
[-- Type: TEXT/PLAIN, Size: 2459 bytes --]
Index: Src/system.h
@@ -286,6 +286,9 @@
# include <sys/filio.h>
#endif
+#ifdef HAVE_CURSES_H
+# include <curses.h>
+#endif
#ifdef HAVE_TERMIOS_H
# ifdef __sco
/* termios.h includes sys/termio.h instead of sys/termios.h; *
@@ -315,6 +318,15 @@
#else
# ifdef HAVE_TERM_H
# include <term.h>
+# endif
+# ifdef tab
+# undef tab
+# endif
+# ifdef columns
+# undef columns
+# endif
+# ifdef lines
+# undef lines
# endif
#endif
Index: Src/Modules/files.c
@@ -185,7 +185,7 @@
static int
bin_ln(char *nam, char **args, char *ops, int func)
{
- MoveFunc move;
+ MoveFunc movefunc;
int flags, err = 0;
char **a, *ptr, *rp, *buf;
struct stat st;
@@ -193,18 +193,18 @@
if(func == BIN_MV) {
- move = (MoveFunc) rename;
+ movefunc = (MoveFunc) rename;
flags = ops['f'] ? 0 : MV_ASKNW;
flags |= MV_ATOMIC;
} else {
flags = ops['f'] ? MV_FORCE : 0;
#ifdef HAVE_LSTAT
if(ops['s'])
- move = (MoveFunc) symlink;
+ movefunc = (MoveFunc) symlink;
else
#endif
{
- move = (MoveFunc) link;
+ movefunc = (MoveFunc) link;
if(!ops['d'])
flags |= MV_NODIRS;
}
@@ -228,7 +228,7 @@
else
args[1] = args[0];
}
- return domove(nam, move, args[0], args[1], flags);
+ return domove(nam, movefunc, args[0], args[1], flags);
havedir:
buf = ztrdup(*a);
*a = NULL;
@@ -244,7 +244,7 @@
buf[blen] = 0;
buf = appstr(buf, ptr);
- err |= domove(nam, move, *args, buf, flags);
+ err |= domove(nam, movefunc, *args, buf, flags);
}
zsfree(buf);
return err;
@@ -252,7 +252,7 @@
/**/
static int
-domove(char *nam, MoveFunc move, char *p, char *q, int flags)
+domove(char *nam, MoveFunc movefunc, char *p, char *q, int flags)
{
struct stat st;
char *pbuf, *qbuf;
@@ -302,7 +302,7 @@
if(doit && !(flags & MV_ATOMIC))
unlink(qbuf);
}
- if(move(pbuf, qbuf)) {
+ if(movefunc(pbuf, qbuf)) {
zwarnnam(nam, "%s: %e", p, errno);
zsfree(pbuf);
return 1;
Index: Src/Modules/terminfo.c
@@ -34,9 +34,6 @@
/**/
#ifdef HAVE_TIGETSTR
-# ifdef HAVE_CURSES_H
-# include <curses.h>
-# endif
static Param terminfo_pm;
Index: Src/Modules/zftp.c
@@ -220,7 +220,7 @@
# ifndef HAVE_GETHOSTBYNAME2
/**/
-static struct hostent *
+struct hostent *
gethostbyname2(char const *name, int af)
{
if(af != AF_INET) {
next prev parent reply other threads:[~2001-04-12 22:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-12 14:33 Vin Shelton
2001-04-12 14:54 ` PATCH: " Clint Adams
2001-04-12 15:39 ` Bart Schaefer
2001-04-12 15:57 ` Bart Schaefer
2001-04-12 16:20 ` Bart Schaefer
2001-04-12 22:29 ` Wayne Davison [this message]
2001-04-12 23:08 ` Bart Schaefer
2001-04-13 1:13 ` Wayne Davison
2001-04-13 3:51 ` Bart Schaefer
2001-04-13 8:00 ` Wayne Davison
2001-04-13 16:42 ` Bart Schaefer
2001-04-13 16:49 ` Wayne Davison
2001-04-12 15:28 ` Bart Schaefer
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=Pine.LNX.4.30.0104121518110.32060-200000@phong.blorf.net \
--to=wayned@users.sourceforge.net \
--cc=schaefer@candle.brasslantern.com \
--cc=zsh-workers@sunsite.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).