Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Make win32 build compile again: - missing headers <io.h> and <fcntl.h> - WCHAR -> wchar_t |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
e3add2c11571078ef38d12088bf36dcb |
| User & Date: | jan.nijtmans 2013-02-21 15:50:37.787 |
Context
|
2013-02-21
| ||
| 15:51 | merge fork ... (check-in: 32bb8c2819 user: jan.nijtmans tags: trunk) | |
| 15:50 | Make win32 build compile again: - missing headers <io.h> and <fcntl.h> - WCHAR -> wchar_t ... (check-in: e3add2c115 user: jan.nijtmans tags: trunk) | |
| 14:54 | Do not prompt for the sync password more than once. ... (check-in: 1cd61c96bc user: drh tags: trunk) | |
Changes
Changes to src/main.c.
| ︙ | ︙ | |||
365 366 367 368 369 370 371 | unsigned int i, j, k; /* Loop counters */ int n; /* Number of bytes in one line */ char *z; /* General use string pointer */ char **newArgv; /* New expanded g.argv under construction */ char const * zFileName; /* input file name */ FILE * zInFile; /* input FILE */ #if defined(_WIN32) | | | 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 | unsigned int i, j, k; /* Loop counters */ int n; /* Number of bytes in one line */ char *z; /* General use string pointer */ char **newArgv; /* New expanded g.argv under construction */ char const * zFileName; /* input file name */ FILE * zInFile; /* input FILE */ #if defined(_WIN32) wchar_t buf[MAX_PATH]; #endif g.argc = argc; g.argv = argv; sqlite3_initialize(); #if defined(_WIN32) && defined(BROKEN_MINGW_CMDLINE) for(i=0; i<g.argc; i++) g.argv[i] = fossil_mbcs_to_utf8(g.argv[i]); |
| ︙ | ︙ |
Changes to src/printf.c.
| ︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ******************************************************************************* ** ** This file contains implementions of routines for formatting output ** (ex: mprintf()) and for output to the console. */ #include "config.h" #include "printf.h" /* ** Conversion types fall into various categories as defined by the ** following enumeration. */ #define etRADIX 1 /* Integer types. %d, %x, %o, and so forth */ #define etFLOAT 2 /* Floating point. %f */ | > > > > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ******************************************************************************* ** ** This file contains implementions of routines for formatting output ** (ex: mprintf()) and for output to the console. */ #include "config.h" #include "printf.h" #if defined(_WIN32) # include <io.h> # include <fcntl.h> #endif /* ** Conversion types fall into various categories as defined by the ** following enumeration. */ #define etRADIX 1 /* Integer types. %d, %x, %o, and so forth */ #define etFLOAT 2 /* Floating point. %f */ |
| ︙ | ︙ |
Changes to src/util.c.
| ︙ | ︙ | |||
51 52 53 54 55 56 57 |
int fossil_system(const char *zOrigCmd){
int rc;
#if defined(_WIN32)
/* On windows, we have to put double-quotes around the entire command.
** Who knows why - this is just the way windows works.
*/
char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
| | | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
int fossil_system(const char *zOrigCmd){
int rc;
#if defined(_WIN32)
/* On windows, we have to put double-quotes around the entire command.
** Who knows why - this is just the way windows works.
*/
char *zNewCmd = mprintf("\"%s\"", zOrigCmd);
wchar_t *zUnicode = fossil_utf8_to_unicode(zNewCmd);
if( g.fSystemTrace ) {
fossil_trace("SYSTEM: %s\n", zNewCmd);
}
rc = _wsystem(zUnicode);
fossil_unicode_free(zUnicode);
free(zNewCmd);
#else
|
| ︙ | ︙ |
Changes to src/winhttp.c.
| ︙ | ︙ | |||
146 147 148 149 150 151 152 |
){
WSADATA wd;
SOCKET s = INVALID_SOCKET;
SOCKADDR_IN addr;
int idCnt = 0;
int iPort = mnPort;
Blob options;
| | | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
){
WSADATA wd;
SOCKET s = INVALID_SOCKET;
SOCKADDR_IN addr;
int idCnt = 0;
int iPort = mnPort;
Blob options;
wchar_t zTmpPath[MAX_PATH];
if( zStopper ) file_delete(zStopper);
blob_zero(&options);
if( zNotFound ){
blob_appendf(&options, " --notfound %s", zNotFound);
}
if( zFileGlob ){
|
| ︙ | ︙ | |||
259 260 261 262 263 264 265 |
typedef struct HttpService HttpService;
struct HttpService {
int port; /* Port on which the http server should run */
const char *zNotFound; /* The --notfound option, or NULL */
const char *zFileGlob; /* The --files option, or NULL */
int flags; /* One or more HTTP_SERVER_ flags */
int isRunningAsService; /* Are we running as a service ? */
| | | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
typedef struct HttpService HttpService;
struct HttpService {
int port; /* Port on which the http server should run */
const char *zNotFound; /* The --notfound option, or NULL */
const char *zFileGlob; /* The --files option, or NULL */
int flags; /* One or more HTTP_SERVER_ flags */
int isRunningAsService; /* Are we running as a service ? */
const wchar_t *zServiceName;/* Name of the service */
SOCKET s; /* Socket on which the http server listens */
};
/*
** Variables used for running as windows service.
*/
static HttpService hsData = {8080, NULL, NULL, 0, 0, NULL, INVALID_SOCKET};
|
| ︙ | ︙ |