Removed C90 limitations and NO_LONG_LONG related stuff as even MinGW on Windows 2000... master
authorRobert Pengelly <robertapengelly@hotmail.com>
Wed, 19 Aug 2026 11:37:38 +0000 (12:37 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Wed, 19 Aug 2026 11:37:38 +0000 (12:37 +0100)
Makefile.unix
Makefile.w32
mcopy.c

index 55b2bdeb203755a3f16ccd64854fad9263906727..e5e3d433db71882efc86b43b9cfaebddab2aae08 100644 (file)
@@ -5,7 +5,7 @@ SRCDIR              ?=  $(CURDIR)
 VPATH               :=  $(SRCDIR)
 
 CC                  :=  gcc
-CFLAGS              :=  -D_FILE_OFFSET_BITS=64 -Wall -Werror -Wextra -std=c90
+CFLAGS              :=  -D_FILE_OFFSET_BITS=64 -Wall -Werror -Wextra
 
 CSRC                :=  common.c report.c write7x.c
 
index b1ac3ba8cb6b0397d9d220f1715f64ea5fee09f6..8c917373bd7506bcd2ea8c981c6b72c95c998057 100644 (file)
@@ -5,7 +5,7 @@ SRCDIR              ?=  $(CURDIR)
 VPATH               :=  $(SRCDIR)
 
 CC                  :=  gcc
-CFLAGS              :=  -D_FILE_OFFSET_BITS=64 -Wall -Werror -Wextra -std=c90
+CFLAGS              :=  -D_FILE_OFFSET_BITS=64 -Wall -Werror -Wextra
 
 CSRC                :=  common.c report.c write7x.c
 
diff --git a/mcopy.c b/mcopy.c
index 259122566bc6e89f7fe8c3647b58442b143e83fb..ab579b2b85fedf2c1500fefc76ed5ea530792159 100644 (file)
--- a/mcopy.c
+++ b/mcopy.c
@@ -8,7 +8,7 @@
 #include    <stdlib.h>
 #include    <string.h>
 
-#if     defined (_WIN32)
+#if    defined (_WIN32)
 # include   <windows.h>
 # include   <winioctl.h>
 #elif defined (__GNUC__)
@@ -443,7 +443,7 @@ static void parse_args (int *pargc, char ***pargv, int optind) {
 /** Get a single character from the terminal. */
 static char getch (void) {
 
-#if     defined(_WIN32)
+#if     defined (_WIN32)
 
     KEY_EVENT_RECORD keyevent;
     INPUT_RECORD irec;
@@ -530,8 +530,6 @@ static char getch (void) {
             ioctl (0, FIONREAD, &nbbytes);                  /* 0 is STDIN */
         
         }
-
-#endif
         
         key = (int) getchar ();
         
@@ -643,6 +641,8 @@ static char getch (void) {
     
     }
 
+#endif
+
 }
 
 static int check_overwrite (const char *fn) {