Differences From Artifact [4c98087550]:
- File
src/main.c
— part of check-in
[ebe241b4df]
at
2012-09-12 20:36:58
on branch restore-win95
— unbreak MSVC build.
Always use platform detection in fossil_system: fossil might be linked with unicows, then still quotes should not be used on Win95
Why did I remove the -DUNICODE from Makefile.msc?....
(user: jan.nijtmans size: 60290)
To Artifact [34122c7954]:
- File src/main.c — part of check-in [bf0fede2ee] at 2012-09-14 10:31:47 on branch restore-win95 — Experimental version for Win9x, using unicows (user: jan.nijtmans size: 60384)
| ︙ | ︙ | |||
195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
const char *azAuxName[MX_AUX]; /* Name of each aux() or option() value */
char *azAuxParam[MX_AUX]; /* Param of each aux() or option() value */
const char *azAuxVal[MX_AUX]; /* Value of each aux() or option() value */
const char **azAuxOpt[MX_AUX]; /* Options of each option() value */
int anAuxCols[MX_AUX]; /* Number of columns for option() values */
int allowSymlinks; /* Cached "allow-symlinks" option */
#ifdef FOSSIL_ENABLE_JSON
struct FossilJsonBits {
int isJsonMode; /* True if running in JSON mode, else
false. This changes how errors are
reported. In JSON mode we try to
always output JSON-form error
| > > > | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
const char *azAuxName[MX_AUX]; /* Name of each aux() or option() value */
char *azAuxParam[MX_AUX]; /* Param of each aux() or option() value */
const char *azAuxVal[MX_AUX]; /* Value of each aux() or option() value */
const char **azAuxOpt[MX_AUX]; /* Options of each option() value */
int anAuxCols[MX_AUX]; /* Number of columns for option() values */
int allowSymlinks; /* Cached "allow-symlinks" option */
#ifdef _WIN32
int isNT;
#endif
#ifdef FOSSIL_ENABLE_JSON
struct FossilJsonBits {
int isJsonMode; /* True if running in JSON mode, else
false. This changes how errors are
reported. In JSON mode we try to
always output JSON-form error
|
| ︙ | ︙ | |||
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 |
** This procedure runs first.
*/
int main(int argc, char **argv)
{
const char *zCmdName = "unknown";
int idx;
int rc;
sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
memset(&g, 0, sizeof(g));
g.now = time(0);
#ifdef FOSSIL_ENABLE_JSON
#if defined(NDEBUG)
g.json.errorDetailParanoia = 2 /* FIXME: make configurable
One problem we have here is that this
code is needed before the db is opened,
so we can't sql for it.*/;
| > > > > > > > > | 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 |
** This procedure runs first.
*/
int main(int argc, char **argv)
{
const char *zCmdName = "unknown";
int idx;
int rc;
#ifdef _WIN32
OSVERSIONINFOA sInfo;
#endif
sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
memset(&g, 0, sizeof(g));
#ifdef _WIN32
sInfo.dwOSVersionInfoSize = sizeof(sInfo);
GetVersionExA(&sInfo);
g.isNT = sInfo.dwPlatformId==VER_PLATFORM_WIN32_NT;
#endif
g.now = time(0);
#ifdef FOSSIL_ENABLE_JSON
#if defined(NDEBUG)
g.json.errorDetailParanoia = 2 /* FIXME: make configurable
One problem we have here is that this
code is needed before the db is opened,
so we can't sql for it.*/;
|
| ︙ | ︙ | |||
828 829 830 831 832 833 834 |
*/
int fossil_system(const char *zOrigCmd){
int rc;
#if defined(_WIN32)
/* On windows NT, we have to put double-quotes around the entire command.
** Who knows why - this is just the way windows works.
*/
| < < < | | 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 |
*/
int fossil_system(const char *zOrigCmd){
int rc;
#if defined(_WIN32)
/* On windows NT, we have to put double-quotes around the entire command.
** Who knows why - this is just the way windows works.
*/
char *zNewCmd;
TCHAR *zMbcs;
if (g.isNT) {
zNewCmd = mprintf("\"%s\"", zOrigCmd);
} else {
zNewCmd = mprintf("%s", zOrigCmd);
}
zMbcs = fossil_utf8_to_mbcs(zNewCmd);
if( g.fSystemTrace ) {
char *zOut = mprintf("SYSTEM: %s\n", zNewCmd);
|
| ︙ | ︙ |