Commit 4dfa6961 by Mumit Khan Committed by Jeff Law

configure.in (NON_UNIX_STDIO): Define if MINGW32.

        * configure.in (NON_UNIX_STDIO): Define if MINGW32.
        (NON_ANSI_RW_MODE): Do not define for CYGWIN32 or MINGW32.
        * libI77/rawio.h: Don't providing conflicting declarations for
        read() and write(). MINGW32 header files use "const" quals.
        * libF77/s_paus.c: _WIN32 does not have pause().

From-SVN: r17397
parent a3105a89
Sat Jan 17 22:40:31 1998 Mumit Khan <khan@xraylith.wisc.edu>
* configure.in (NON_UNIX_STDIO): Define if MINGW32.
(NON_ANSI_RW_MODE): Do not define for CYGWIN32 or MINGW32.
* libI77/rawio.h: Don't providing conflicting declarations for
read() and write(). MINGW32 header files use "const" quals.
* libF77/s_paus.c: _WIN32 does not have pause().
Tue Nov 18 09:49:04 1997 Mumit Khan (khan@xraylith.wisc.edu)
* libI77/close.c (f_exit): Reset f__init so that f_clos does not
......
......@@ -118,6 +118,19 @@ AC_CACHE_VAL(g77_cv_sys_cygwin32,
g77_cv_sys_cygwin32=no))
AC_MSG_RESULT($g77_cv_sys_cygwin32)
# ditto for mingw32.
AC_MSG_CHECKING([for mingw32])
AC_CACHE_VAL(g77_cv_sys_mingw32,
AC_EGREP_CPP(yes,
[#ifdef __MINGW32__
yes
#endif
],
g77_cv_sys_mingw32=yes,
g77_cv_sys_mingw32=no))
AC_MSG_RESULT($g77_cv_sys_mingw32)
AC_CHECK_HEADER(fcntl.h,
test $g77_cv_header_posix = yes && AC_DEFINE(_POSIX_SOURCE),
AC_DEFINE(NO_FCNTL) AC_DEFINE(OPEN_DECL))
......@@ -141,10 +154,12 @@ fi
# This should always succeed on unix.
# Apparently positive result on cygwin loses re. NON_UNIX_STDIO
# (as of cygwin b18).
# (as of cygwin b18). Likewise on mingw.
AC_CHECK_FUNC(fstat)
AC_MSG_CHECKING([need for NON_UNIX_STDIO])
if test $g77_cv_sys_cygwin32 = yes || test $ac_cv_func_fstat = no; then
if test $g77_cv_sys_cygwin32 = yes \
|| test $g77_cv_sys_mingw32 = yes \
|| test $ac_cv_func_fstat = no; then
AC_MSG_RESULT(yes)
AC_DEFINE(NON_UNIX_STDIO)
else
......@@ -215,7 +230,7 @@ AC_EGREP_CPP(yes,
yes
#endif
], is_unix=yes, is_unix=no)
if test $g77_cv_sys_cygwin32 = yes; then
if test $g77_cv_sys_cygwin32 = yes || test $g77_cv_sys_mingw32 = yes; then
AC_MSG_RESULT(no)
else
if test $is_unix = yes; then
......
......@@ -60,7 +60,7 @@ s_paus(char *s, ftnlen n)
if( isatty(fileno(stdin)) )
s_1paus(stdin);
else {
#if (defined (MSDOS) && !defined (GO32)) || defined(__CYGWIN32__)
#if (defined (MSDOS) && !defined (GO32)) || defined (_WIN32)
FILE *fin;
fin = fopen("con", "r");
if (!fin) {
......
......@@ -19,7 +19,9 @@ extern "C" {
extern int creat(const char*,int), open(const char*,int);
#endif
extern int close(int);
#if !(defined(_WIN32) && !defined(__CYGWIN32__))
extern int read(int,void*,size_t), write(int,void*,size_t);
#endif
extern int unlink(const char*);
#ifndef _POSIX_SOURCE
#ifndef NON_UNIX_STDIO
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment