Fossil

Check-in [d89b99e3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge the mingw-w64 compiler warning fixes into trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d89b99e38365155b7e59a67a9f3012dfe28a847b
User & Date: drh 2012-08-21 14:15:38
References
2012-08-27
19:05
Re-do part of [d89b99e383], which was lost by [d7736649cd] check-in: 22806c5f user: jan.nijtmans tags: trunk
Context
2012-08-21
14:25
Tcl only uses argv0 so it is enough to transfer only that one argument. check-in: 7f96a715 user: drh tags: trunk
14:15
Merge the mingw-w64 compiler warning fixes into trunk. check-in: d89b99e3 user: drh tags: trunk
11:18
In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/ws2tcpip.h:11:0, from src/cgi.c:29: /usr/x86_64-w64-mingw32/sys-root/mingw/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h src/file.c:47:0: warning: "stat" redefined /usr/x86_64-w64-mingw32/sys-root/mingw/include/sys/stat.h:258:0: note: this is the location of the previous definition In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/ws2tcpip.h:11:0, from src/http_socket.c:35: /usr/x86_64-w64-mingw32/sys-root/mingw/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h src/shell.c:67:0: warning: "popen" redefined /usr/x86_64-w64-mingw32/sys-root/mingw/include/stdio.h:503:0: note: this is the location of the previous definition src/shell.c:68:0: warning: "pclose" redefined /usr/x86_64-w64-mingw32/sys-root/mingw/include/stdio.h:504:0: note: this is the location of the previous definition Closed-Leaf check-in: b5d69afe user: jan.nijtmans tags: jn-mingw-w64-compiler-warnings
11:05
Fix error messages associated with the "scrub" command. check-in: e25f55dd user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/cgi.c.

19
20
21
22
23
24
25
26
27
28
29
30


31
32
33
34
35
36
37
** services to CGI programs.  There are procedures for parsing and
** dispensing QUERY_STRING parameters and cookies, the "mprintf()"
** formatting function and its cousins, and routines to encode and
** decode strings in HTML or HTTP.
*/
#include "config.h"
#ifdef _WIN32
# include <windows.h>           /* for Sleep once server works again */
#  if defined(__MINGW32__)
#    define sleep Sleep            /* windows does not have sleep, but Sleep */
#    include <ws2tcpip.h>          
#  endif


#else
# include <sys/socket.h>
# include <netinet/in.h>
# include <arpa/inet.h>
# include <sys/times.h>
# include <sys/time.h>
# include <sys/wait.h>







<

<
|

>
>







19
20
21
22
23
24
25

26

27
28
29
30
31
32
33
34
35
36
37
** services to CGI programs.  There are procedures for parsing and
** dispensing QUERY_STRING parameters and cookies, the "mprintf()"
** formatting function and its cousins, and routines to encode and
** decode strings in HTML or HTTP.
*/
#include "config.h"
#ifdef _WIN32

#  if defined(__MINGW32__)

#    include <ws2tcpip.h>
#  endif
#  include <windows.h>           /* for Sleep once server works again */
#  define sleep Sleep            /* windows does not have sleep, but Sleep */
#else
# include <sys/socket.h>
# include <netinet/in.h>
# include <arpa/inet.h>
# include <sys/times.h>
# include <sys/time.h>
# include <sys/wait.h>

Changes to src/file.c.

40
41
42
43
44
45
46

47
48
49
50
51
52
53
/*
** The file status information from the most recent stat() call.
**
** Use _stati64 rather than stat on windows, in order to handle files
** larger than 2GB.
*/
#if defined(_WIN32) && (defined(__MSVCRT__) || defined(_MSC_VER))

# define stat _stati64
#endif
/*
** On Windows S_ISLNK always returns FALSE.
*/
#if defined(_WIN32)
# define S_ISLNK(x) (0)







>







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
** The file status information from the most recent stat() call.
**
** Use _stati64 rather than stat on windows, in order to handle files
** larger than 2GB.
*/
#if defined(_WIN32) && (defined(__MSVCRT__) || defined(_MSC_VER))
# undef stat
# define stat _stati64
#endif
/*
** On Windows S_ISLNK always returns FALSE.
*/
#if defined(_WIN32)
# define S_ISLNK(x) (0)

Changes to src/http_socket.c.

25
26
27
28
29
30
31
32
33
34
35
36


37
38
39
40
41
42
43
** Low-level sockets are abstracted out into this module because they 
** are handled different on Unix and windows.
*/

#include "config.h"
#include "http_socket.h"
#if defined(_WIN32)
#  include <windows.h>           /* for Sleep once server works again */
#  define sleep Sleep            /* windows does not have sleep, but Sleep */
#  if defined(__MINGW32__)
#    include <ws2tcpip.h>          
#  endif


#else
#  include <netinet/in.h>
#  include <arpa/inet.h>
#  include <sys/socket.h>
#  include <netdb.h>
#endif
#include <assert.h>







<
<



>
>







25
26
27
28
29
30
31


32
33
34
35
36
37
38
39
40
41
42
43
** Low-level sockets are abstracted out into this module because they 
** are handled different on Unix and windows.
*/

#include "config.h"
#include "http_socket.h"
#if defined(_WIN32)


#  if defined(__MINGW32__)
#    include <ws2tcpip.h>          
#  endif
#  include <windows.h>           /* for Sleep once server works again */
#  define sleep Sleep            /* windows does not have sleep, but Sleep */
#else
#  include <netinet/in.h>
#  include <arpa/inet.h>
#  include <sys/socket.h>
#  include <netdb.h>
#endif
#include <assert.h>

Changes to src/shell.c.

60
61
62
63
64
65
66

67

68
69
70
71
72
73
74
# define stifle_history(X)
#endif

#if defined(_WIN32) || defined(WIN32)
# include <io.h>
#define isatty(h) _isatty(h)
#define access(f,m) _access((f),(m))

#define popen(a,b) _popen((a),(b))

#define pclose(x) _pclose(x)
#else
/* Make sure isatty() has a prototype.
*/
extern int isatty(int);
#endif








>

>







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# define stifle_history(X)
#endif

#if defined(_WIN32) || defined(WIN32)
# include <io.h>
#define isatty(h) _isatty(h)
#define access(f,m) _access((f),(m))
#undef popen
#define popen(a,b) _popen((a),(b))
#undef pclose
#define pclose(x) _pclose(x)
#else
/* Make sure isatty() has a prototype.
*/
extern int isatty(int);
#endif