mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-07 11:41:16 +02:00
Merge of 21544: ioctl() prototyping was substandard and missing on Cygwin.
This commit is contained in:
parent
56b5fd98f1
commit
4bf31462bb
2 changed files with 55 additions and 31 deletions
|
@ -337,7 +337,7 @@ struct timezone {
|
||||||
# endif /* HAVE_TERMIO_H */
|
# endif /* HAVE_TERMIO_H */
|
||||||
#endif /* HAVE_TERMIOS_H */
|
#endif /* HAVE_TERMIOS_H */
|
||||||
|
|
||||||
#if defined(GWINSZ_IN_SYS_IOCTL) || defined(CLOBBERS_TYPEAHEAD)
|
#if defined(GWINSZ_IN_SYS_IOCTL) || defined(IOCTL_IN_SYS_IOCTL)
|
||||||
# include <sys/ioctl.h>
|
# include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef WINSIZE_IN_PTEM
|
#ifdef WINSIZE_IN_PTEM
|
||||||
|
|
84
configure.ac
84
configure.ac
|
@ -551,18 +551,15 @@ if test $ac_cv_header_sys_time_h = yes && test $ac_cv_header_sys_select_h = yes;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CACHE_CHECK(POSIX termios, zsh_cv_sys_posix_termios,
|
AH_TEMPLATE([GWINSZ_IN_SYS_IOCTL],
|
||||||
[AC_TRY_LINK([#include <sys/types.h>
|
[Define if TIOCGWINSZ is defined in sys/ioctl.h but not in termios.h.])
|
||||||
#include <unistd.h>
|
if test $ac_cv_header_termios_h = yes; then
|
||||||
#include <termios.h>],
|
|
||||||
[/* SunOS 4.0.3 has termios.h but not the library calls. */
|
|
||||||
tcgetattr(0, 0);],
|
|
||||||
zsh_cv_sys_posix_termios=yes, zsh_cv_sys_posix_termios=no)])
|
|
||||||
|
|
||||||
if test $zsh_cv_sys_posix_termios = yes; then
|
|
||||||
AC_CACHE_CHECK(TIOCGWINSZ in termios.h,
|
AC_CACHE_CHECK(TIOCGWINSZ in termios.h,
|
||||||
zsh_cv_header_termios_h_tiocgwinsz,
|
zsh_cv_header_termios_h_tiocgwinsz,
|
||||||
[AC_TRY_LINK([#include <sys/types.h>
|
[AC_TRY_LINK([
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
#include <termios.h>],
|
#include <termios.h>],
|
||||||
[int x = TIOCGWINSZ;],
|
[int x = TIOCGWINSZ;],
|
||||||
zsh_cv_header_termios_h_tiocgwinsz=yes,
|
zsh_cv_header_termios_h_tiocgwinsz=yes,
|
||||||
|
@ -570,13 +567,13 @@ if test $zsh_cv_sys_posix_termios = yes; then
|
||||||
else
|
else
|
||||||
zsh_cv_header_termios_h_tiocgwinsz=no
|
zsh_cv_header_termios_h_tiocgwinsz=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AH_TEMPLATE([GWINSZ_IN_SYS_IOCTL],
|
|
||||||
[Define if your system defines TIOCGWINSZ in sys/ioctl.h.])
|
|
||||||
if test $zsh_cv_header_termios_h_tiocgwinsz = no; then
|
if test $zsh_cv_header_termios_h_tiocgwinsz = no; then
|
||||||
AC_CACHE_CHECK(TIOCGWINSZ in sys/ioctl.h,
|
AC_CACHE_CHECK(TIOCGWINSZ in sys/ioctl.h,
|
||||||
zsh_cv_header_sys_ioctl_h_tiocgwinsz,
|
zsh_cv_header_sys_ioctl_h_tiocgwinsz,
|
||||||
[AC_TRY_LINK([#include <sys/types.h>
|
[AC_TRY_LINK([
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
#include <sys/ioctl.h>],
|
#include <sys/ioctl.h>],
|
||||||
[int x = TIOCGWINSZ;],
|
[int x = TIOCGWINSZ;],
|
||||||
zsh_cv_header_sys_ioctl_h_tiocgwinsz=yes,
|
zsh_cv_header_sys_ioctl_h_tiocgwinsz=yes,
|
||||||
|
@ -1670,24 +1667,12 @@ if test $zsh_cv_header_unistd_h_sbrk_proto = yes; then
|
||||||
AC_DEFINE(HAVE_SBRK_PROTO)
|
AC_DEFINE(HAVE_SBRK_PROTO)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl ----------------------------------
|
dnl -----------------------
|
||||||
dnl ioctl and mknod prototypes for OSF
|
dnl mknod prototype for OSF
|
||||||
dnl ----------------------------------
|
dnl -----------------------
|
||||||
|
|
||||||
AH_TEMPLATE([HAVE_IOCTL_PROTO],
|
|
||||||
[Define to 1 if there is a prototype defined for ioctl() on your system])
|
|
||||||
AH_TEMPLATE([HAVE_MKNOD_PROTO],
|
AH_TEMPLATE([HAVE_MKNOD_PROTO],
|
||||||
[Define to 1 if there is a prototype defined for mknod() on your system])
|
[Define to 1 if there is a prototype defined for mknod() on your system.])
|
||||||
if test "$ac_cv_prog_cc_stdc" != no; then
|
if test "$ac_cv_prog_cc_stdc" != no; then
|
||||||
AC_CACHE_CHECK(for ioctl prototype in <sys/ioctl.h>,
|
|
||||||
zsh_cv_header_sys_ioctl_h_ioctl_proto,
|
|
||||||
[AC_TRY_COMPILE([#include <sys/ioctl.h>
|
|
||||||
int ioctl(double x);], [int i;],
|
|
||||||
zsh_cv_header_sys_ioctl_h_ioctl_proto=no,
|
|
||||||
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>,
|
AC_CACHE_CHECK(for mknod prototype in <sys/stat.h>,
|
||||||
zsh_cv_header_sys_stat_h_mknod_proto,
|
zsh_cv_header_sys_stat_h_mknod_proto,
|
||||||
[AC_TRY_COMPILE([#include <sys/stat.h>
|
[AC_TRY_COMPILE([#include <sys/stat.h>
|
||||||
|
@ -1699,6 +1684,45 @@ if test "$ac_cv_prog_cc_stdc" != no; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl ----------------------------------------
|
||||||
|
dnl presence and location of ioctl prototype
|
||||||
|
dnl ----------------------------------------
|
||||||
|
AC_CACHE_CHECK(for ioctl prototype in <unistd.h> or <termios.h>,
|
||||||
|
zsh_cv_header_unistd_h_termios_h_ioctl_proto,
|
||||||
|
[AC_TRY_COMPILE([
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_TERMIOS_H
|
||||||
|
# include <termios.h>
|
||||||
|
#endif
|
||||||
|
double ioctl();], [int i;],
|
||||||
|
zsh_cv_header_unistd_h_termios_h_ioctl_proto=no,
|
||||||
|
zsh_cv_header_unistd_h_termios_h_ioctl_proto=yes)])
|
||||||
|
|
||||||
|
if test $zsh_cv_header_unistd_h_termios_h_ioctl_proto = no; then
|
||||||
|
AC_CACHE_CHECK(for ioctl prototype in <sys/ioctl.h>,
|
||||||
|
zsh_cv_header_sys_ioctl_h_ioctl_proto,
|
||||||
|
[AC_TRY_COMPILE([#include <sys/ioctl.h>
|
||||||
|
double ioctl();], [int i;],
|
||||||
|
zsh_cv_header_sys_ioctl_h_ioctl_proto=no,
|
||||||
|
zsh_cv_header_sys_ioctl_h_ioctl_proto=yes)])
|
||||||
|
else
|
||||||
|
zsh_cv_header_sys_ioctl_h_ioctl_proto=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
AH_TEMPLATE([HAVE_IOCTL_PROTO],
|
||||||
|
[Define to 1 if there is a prototype defined for ioctl() on your system.])
|
||||||
|
if test $zsh_cv_header_unistd_h_termios_h_ioctl_proto = yes || \
|
||||||
|
test $zsh_cv_header_sys_ioctl_h_ioctl_proto = yes; then
|
||||||
|
AC_DEFINE(HAVE_IOCTL_PROTO)
|
||||||
|
fi
|
||||||
|
AH_TEMPLATE([IOCTL_IN_SYS_IOCTL],
|
||||||
|
[Define to 1 if we must include <sys/ioctl.h> to get a prototype for ioctl().])
|
||||||
|
if test $zsh_cv_header_sys_ioctl_h_ioctl_proto = yes; then
|
||||||
|
AC_DEFINE(IOCTL_IN_SYS_IOCTL)
|
||||||
|
fi
|
||||||
|
|
||||||
dnl -------------------
|
dnl -------------------
|
||||||
dnl select() defined in <sys/socket.h>, ie BeOS R4.51
|
dnl select() defined in <sys/socket.h>, ie BeOS R4.51
|
||||||
dnl -------------------
|
dnl -------------------
|
||||||
|
|
Loading…
Reference in a new issue