Fossil SCM

Merge the mingw-w64 compiler warning fixes into trunk.

drh 2012-08-21 14:15 trunk merge
Commit d89b99e38365155b7e59a67a9f3012dfe28a847b
+3 -3
--- src/cgi.c
+++ src/cgi.c
@@ -21,15 +21,15 @@
2121
** formatting function and its cousins, and routines to encode and
2222
** decode strings in HTML or HTTP.
2323
*/
2424
#include "config.h"
2525
#ifdef _WIN32
26
-# include <windows.h> /* for Sleep once server works again */
2726
# if defined(__MINGW32__)
28
-# define sleep Sleep /* windows does not have sleep, but Sleep */
29
-# include <ws2tcpip.h>
27
+# include <ws2tcpip.h>
3028
# endif
29
+# include <windows.h> /* for Sleep once server works again */
30
+# define sleep Sleep /* windows does not have sleep, but Sleep */
3131
#else
3232
# include <sys/socket.h>
3333
# include <netinet/in.h>
3434
# include <arpa/inet.h>
3535
# include <sys/times.h>
3636
--- 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 @@
4242
**
4343
** Use _stati64 rather than stat on windows, in order to handle files
4444
** larger than 2GB.
4545
*/
4646
#if defined(_WIN32) && (defined(__MSVCRT__) || defined(_MSC_VER))
47
+# undef stat
4748
# define stat _stati64
4849
#endif
4950
/*
5051
** On Windows S_ISLNK always returns FALSE.
5152
*/
5253
--- 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
--- src/http_socket.c
+++ src/http_socket.c
@@ -27,15 +27,15 @@
2727
*/
2828
2929
#include "config.h"
3030
#include "http_socket.h"
3131
#if defined(_WIN32)
32
-# include <windows.h> /* for Sleep once server works again */
33
-# define sleep Sleep /* windows does not have sleep, but Sleep */
3432
# if defined(__MINGW32__)
3533
# include <ws2tcpip.h>
3634
# endif
35
+# include <windows.h> /* for Sleep once server works again */
36
+# define sleep Sleep /* windows does not have sleep, but Sleep */
3737
#else
3838
# include <netinet/in.h>
3939
# include <arpa/inet.h>
4040
# include <sys/socket.h>
4141
# include <netdb.h>
4242
--- 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
--- src/shell.c
+++ src/shell.c
@@ -62,11 +62,13 @@
6262
6363
#if defined(_WIN32) || defined(WIN32)
6464
# include <io.h>
6565
#define isatty(h) _isatty(h)
6666
#define access(f,m) _access((f),(m))
67
+#undef popen
6768
#define popen(a,b) _popen((a),(b))
69
+#undef pclose
6870
#define pclose(x) _pclose(x)
6971
#else
7072
/* Make sure isatty() has a prototype.
7173
*/
7274
extern int isatty(int);
7375
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button