--- a/arith.h
+++ b/arith.h
@@ -0,0 +1,5 @@
+#define IEEE_8087
+#define Arith_Kind_ASL 1
+#define Double_Align
+#define QNaN0 0x0
+#define QNaN1 0xfff80000
--- a/main.c
+++ b/main.c
@@ -45,11 +45,9 @@
 
 #ifdef KR_headers
 extern VOID f_init(), sig_die();
-extern int MAIN__();
 #define Int /* int */
 #else
 extern void f_init(void), sig_die(const char*, int);
-extern int MAIN__(void);
 #define Int int
 #endif
 
@@ -135,7 +133,6 @@
 #ifndef NO_ONEXIT
 ONEXIT(f_exit);
 #endif
-MAIN__();
 #ifdef NO_ONEXIT
 f_exit();
 #endif
--- a/makefile.u
+++ b/makefile.u
@@ -20,8 +20,8 @@ CFLAGS = -O
 # compile, then strip unnecessary symbols
 .c.o:
 	$(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
-	ld -r -x -o $*.xxx $*.o
-	mv $*.xxx $*.o
+#	ld -r -x -o $*.xxx $*.o
+#	mv $*.xxx $*.o
 ## Under Solaris (and other systems that do not understand ld -x),
 ## omit -x in the ld line above.
 ## If your system does not have the ld command, comment out
@@ -74,8 +74,8 @@ all: libf2c.a
 $(OFILES): f2c.h signal1.h sysdep1.h
 
 libf2c.a: $(OFILES)
-	ar r libf2c.a $?
-	-ranlib libf2c.a
+	$(AR) r libf2c.a $?
+	-$(RANLIB) libf2c.a
 
 ## Shared-library variant: the following rule works on Linux
 ## systems.  Details are system-dependent.  Under Linux, -fPIC
@@ -128,7 +128,7 @@ sysdep1.h: sysdep1.h0
 
 install: libf2c.a
 	cp libf2c.a $(LIBDIR)
-	-ranlib $(LIBDIR)/libf2c.a
+	-$(RANLIB) $(LIBDIR)/libf2c.a
 
 clean:
 	rm -f libf2c.a *.o arith.h signal1.h sysdep1.h
@@ -187,12 +187,6 @@ xwsne.o:	fio.h
 xwsne.o:	lio.h
 xwsne.o:	fmt.h
 
-arith.h: arithchk.c
-	$(CC) $(CFLAGS) -DNO_FPINIT arithchk.c -lm ||\
-	 $(CC) -DNO_LONG_LONG $(CFLAGS) -DNO_FPINIT arithchk.c -lm
-	./a.exe >arith.h
-	rm -f a.exe arithchk.o
-
 check:
 	xsum Notice README abort_.c arithchk.c backspac.c c_abs.c c_cos.c \
 	c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c cabs.c close.c comptry.bat \
--- a/s_paus.c
+++ b/s_paus.c
@@ -19,7 +19,10 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
-extern int getpid(void), isatty(int), pause(void);
+extern int getpid(void), isatty(int);
+#if !defined(MSDOS) || !defined(_WIN32)
+extern int pause(void);
+#endif
 #endif
 
 extern VOID f_exit(Void);
@@ -65,7 +68,7 @@
 	if( isatty(fileno(stdin)) )
 		s_1paus(stdin);
 	else {
-#ifdef MSDOS
+#if defined(MSDOS) || defined(_WIN32)
 		FILE *fin;
 		fin = fopen("con", "r");
 		if (!fin) {
