Fossil SCM
Merge the mingw-w64 compiler warning fixes into trunk.
Commit
d89b99e38365155b7e59a67a9f3012dfe28a847b
Parent
e25f55dd4d910f6…
4 files changed
+3
-3
+1
+2
-2
+2
+3
-3
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -21,15 +21,15 @@ | ||
| 21 | 21 | ** formatting function and its cousins, and routines to encode and |
| 22 | 22 | ** decode strings in HTML or HTTP. |
| 23 | 23 | */ |
| 24 | 24 | #include "config.h" |
| 25 | 25 | #ifdef _WIN32 |
| 26 | -# include <windows.h> /* for Sleep once server works again */ | |
| 27 | 26 | # if defined(__MINGW32__) |
| 28 | -# define sleep Sleep /* windows does not have sleep, but Sleep */ | |
| 29 | -# include <ws2tcpip.h> | |
| 27 | +# include <ws2tcpip.h> | |
| 30 | 28 | # endif |
| 29 | +# include <windows.h> /* for Sleep once server works again */ | |
| 30 | +# define sleep Sleep /* windows does not have sleep, but Sleep */ | |
| 31 | 31 | #else |
| 32 | 32 | # include <sys/socket.h> |
| 33 | 33 | # include <netinet/in.h> |
| 34 | 34 | # include <arpa/inet.h> |
| 35 | 35 | # include <sys/times.h> |
| 36 | 36 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -21,15 +21,15 @@ | |
| 21 | ** formatting function and its cousins, and routines to encode and |
| 22 | ** decode strings in HTML or HTTP. |
| 23 | */ |
| 24 | #include "config.h" |
| 25 | #ifdef _WIN32 |
| 26 | # include <windows.h> /* for Sleep once server works again */ |
| 27 | # if defined(__MINGW32__) |
| 28 | # define sleep Sleep /* windows does not have sleep, but Sleep */ |
| 29 | # include <ws2tcpip.h> |
| 30 | # endif |
| 31 | #else |
| 32 | # include <sys/socket.h> |
| 33 | # include <netinet/in.h> |
| 34 | # include <arpa/inet.h> |
| 35 | # include <sys/times.h> |
| 36 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -21,15 +21,15 @@ | |
| 21 | ** formatting function and its cousins, and routines to encode and |
| 22 | ** decode strings in HTML or HTTP. |
| 23 | */ |
| 24 | #include "config.h" |
| 25 | #ifdef _WIN32 |
| 26 | # if defined(__MINGW32__) |
| 27 | # include <ws2tcpip.h> |
| 28 | # endif |
| 29 | # include <windows.h> /* for Sleep once server works again */ |
| 30 | # define sleep Sleep /* windows does not have sleep, but Sleep */ |
| 31 | #else |
| 32 | # include <sys/socket.h> |
| 33 | # include <netinet/in.h> |
| 34 | # include <arpa/inet.h> |
| 35 | # include <sys/times.h> |
| 36 |
+1
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -42,10 +42,11 @@ | ||
| 42 | 42 | ** |
| 43 | 43 | ** Use _stati64 rather than stat on windows, in order to handle files |
| 44 | 44 | ** larger than 2GB. |
| 45 | 45 | */ |
| 46 | 46 | #if defined(_WIN32) && (defined(__MSVCRT__) || defined(_MSC_VER)) |
| 47 | +# undef stat | |
| 47 | 48 | # define stat _stati64 |
| 48 | 49 | #endif |
| 49 | 50 | /* |
| 50 | 51 | ** On Windows S_ISLNK always returns FALSE. |
| 51 | 52 | */ |
| 52 | 53 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -42,10 +42,11 @@ | |
| 42 | ** |
| 43 | ** Use _stati64 rather than stat on windows, in order to handle files |
| 44 | ** larger than 2GB. |
| 45 | */ |
| 46 | #if defined(_WIN32) && (defined(__MSVCRT__) || defined(_MSC_VER)) |
| 47 | # define stat _stati64 |
| 48 | #endif |
| 49 | /* |
| 50 | ** On Windows S_ISLNK always returns FALSE. |
| 51 | */ |
| 52 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -42,10 +42,11 @@ | |
| 42 | ** |
| 43 | ** Use _stati64 rather than stat on windows, in order to handle files |
| 44 | ** larger than 2GB. |
| 45 | */ |
| 46 | #if defined(_WIN32) && (defined(__MSVCRT__) || defined(_MSC_VER)) |
| 47 | # undef stat |
| 48 | # define stat _stati64 |
| 49 | #endif |
| 50 | /* |
| 51 | ** On Windows S_ISLNK always returns FALSE. |
| 52 | */ |
| 53 |
+2
-2
| --- src/http_socket.c | ||
| +++ src/http_socket.c | ||
| @@ -27,15 +27,15 @@ | ||
| 27 | 27 | */ |
| 28 | 28 | |
| 29 | 29 | #include "config.h" |
| 30 | 30 | #include "http_socket.h" |
| 31 | 31 | #if defined(_WIN32) |
| 32 | -# include <windows.h> /* for Sleep once server works again */ | |
| 33 | -# define sleep Sleep /* windows does not have sleep, but Sleep */ | |
| 34 | 32 | # if defined(__MINGW32__) |
| 35 | 33 | # include <ws2tcpip.h> |
| 36 | 34 | # endif |
| 35 | +# include <windows.h> /* for Sleep once server works again */ | |
| 36 | +# define sleep Sleep /* windows does not have sleep, but Sleep */ | |
| 37 | 37 | #else |
| 38 | 38 | # include <netinet/in.h> |
| 39 | 39 | # include <arpa/inet.h> |
| 40 | 40 | # include <sys/socket.h> |
| 41 | 41 | # include <netdb.h> |
| 42 | 42 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -27,15 +27,15 @@ | |
| 27 | */ |
| 28 | |
| 29 | #include "config.h" |
| 30 | #include "http_socket.h" |
| 31 | #if defined(_WIN32) |
| 32 | # include <windows.h> /* for Sleep once server works again */ |
| 33 | # define sleep Sleep /* windows does not have sleep, but Sleep */ |
| 34 | # if defined(__MINGW32__) |
| 35 | # include <ws2tcpip.h> |
| 36 | # endif |
| 37 | #else |
| 38 | # include <netinet/in.h> |
| 39 | # include <arpa/inet.h> |
| 40 | # include <sys/socket.h> |
| 41 | # include <netdb.h> |
| 42 |
| --- src/http_socket.c | |
| +++ src/http_socket.c | |
| @@ -27,15 +27,15 @@ | |
| 27 | */ |
| 28 | |
| 29 | #include "config.h" |
| 30 | #include "http_socket.h" |
| 31 | #if defined(_WIN32) |
| 32 | # if defined(__MINGW32__) |
| 33 | # include <ws2tcpip.h> |
| 34 | # endif |
| 35 | # include <windows.h> /* for Sleep once server works again */ |
| 36 | # define sleep Sleep /* windows does not have sleep, but Sleep */ |
| 37 | #else |
| 38 | # include <netinet/in.h> |
| 39 | # include <arpa/inet.h> |
| 40 | # include <sys/socket.h> |
| 41 | # include <netdb.h> |
| 42 |
+2
| --- src/shell.c | ||
| +++ src/shell.c | ||
| @@ -62,11 +62,13 @@ | ||
| 62 | 62 | |
| 63 | 63 | #if defined(_WIN32) || defined(WIN32) |
| 64 | 64 | # include <io.h> |
| 65 | 65 | #define isatty(h) _isatty(h) |
| 66 | 66 | #define access(f,m) _access((f),(m)) |
| 67 | +#undef popen | |
| 67 | 68 | #define popen(a,b) _popen((a),(b)) |
| 69 | +#undef pclose | |
| 68 | 70 | #define pclose(x) _pclose(x) |
| 69 | 71 | #else |
| 70 | 72 | /* Make sure isatty() has a prototype. |
| 71 | 73 | */ |
| 72 | 74 | extern int isatty(int); |
| 73 | 75 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -62,11 +62,13 @@ | |
| 62 | |
| 63 | #if defined(_WIN32) || defined(WIN32) |
| 64 | # include <io.h> |
| 65 | #define isatty(h) _isatty(h) |
| 66 | #define access(f,m) _access((f),(m)) |
| 67 | #define popen(a,b) _popen((a),(b)) |
| 68 | #define pclose(x) _pclose(x) |
| 69 | #else |
| 70 | /* Make sure isatty() has a prototype. |
| 71 | */ |
| 72 | extern int isatty(int); |
| 73 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -62,11 +62,13 @@ | |
| 62 | |
| 63 | #if defined(_WIN32) || defined(WIN32) |
| 64 | # include <io.h> |
| 65 | #define isatty(h) _isatty(h) |
| 66 | #define access(f,m) _access((f),(m)) |
| 67 | #undef popen |
| 68 | #define popen(a,b) _popen((a),(b)) |
| 69 | #undef pclose |
| 70 | #define pclose(x) _pclose(x) |
| 71 | #else |
| 72 | /* Make sure isatty() has a prototype. |
| 73 | */ |
| 74 | extern int isatty(int); |
| 75 |