From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Detect prototype for mknod()
Date: Mon, 28 Feb 2000 04:33:49 +0000 [thread overview]
Message-ID: <1000228043349.ZM7849@candle.brasslantern.com> (raw)
This is part of the 3.0.7 to 3.0.8 patch, which should be applied to 3.1.6.
The exec.c hunks just fix a typo and reset xtrerr a bit sooner (paranoia).
Index: acconfig.h
===================================================================
@@ -207,6 +207,9 @@
/* Define to 1 if there is a prototype defined for ioctl() on your system */
#undef HAVE_IOCTL_PROTO
+/* Define to 1 if there is a prototype defined for mknod() on your system */
+#undef HAVE_MKNOD_PROTO
+
/* Define to 1 if select() is defined in <sys/socket.h>, ie BeOS R4.51*/
#undef SELECT_IN_SYS_SOCKET_H
Index: configure.in
===================================================================
@@ -1086,9 +1086,9 @@
AC_DEFINE(HAVE_SBRK_PROTO)
fi
-dnl ------------------------
-dnl ioctl prototypes for OSF
-dnl ------------------------
+dnl ----------------------------------
+dnl ioctl and mknod prototypes for OSF
+dnl ----------------------------------
if test "$ac_cv_prog_cc_stdc" != no; then
AC_CACHE_CHECK(for ioctl prototype in <sys/ioctl.h>,
@@ -1099,6 +1099,15 @@
zsh_cv_header_sys_ioctl_h_ioctl_proto=yes)])
if test $zsh_cv_header_sys_ioctl_h_ioctl_proto = yes; then
AC_DEFINE(HAVE_IOCTL_PROTO)
+ fi
+ AC_CACHE_CHECK(for mknod prototype in <sys/stat.h>,
+ zsh_cv_header_sys_stat_h_mknod_proto,
+ [AC_TRY_COMPILE([#include <sys/stat.h>
+ int mknod(double x);], [int i;],
+ zsh_cv_header_sys_stat_h_mknod_proto=no,
+ zsh_cv_header_sys_stat_h_mknod_proto=yes)])
+ if test $zsh_cv_header_sys_stat_h_mknod_proto = yes; then
+ AC_DEFINE(HAVE_MKNOD_PROTO)
fi
fi
Index: Src/exec.c
===================================================================
@@ -1278,7 +1278,7 @@
}
}
-/* Open a file for writing redicection */
+/* Open a file for writing redirection */
/**/
static int
@@ -2311,8 +2311,8 @@
if (xtrerr != stderr) {
fil = fileno(xtrerr);
fclose(xtrerr);
- zclose(fil);
xtrerr = stderr;
+ zclose(fil);
}
}
Index: Src/prototypes.h
===================================================================
@@ -66,7 +66,9 @@
# ifndef HAVE_IOCTL_PROTO
int ioctl _((int d, unsigned long request, void *argp));
# endif
+# ifndef HAVE_MKNOD_PROTO
int mknod _((const char *pathname, int mode, dev_t device));
+# endif
int nice _((int increment));
int select _((int nfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval *timeout));
#endif
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
reply other threads:[~2000-02-28 4:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1000228043349.ZM7849@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--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).