Files
MINGW-packages/mingw-w64-fossil/win.patch
2018-06-14 15:45:49 +03:00

153 lines
4.7 KiB
Diff

diff -aur fossil-src-1.33.orig/Makefile.in fossil-src-1.33/Makefile.in
--- fossil-src-1.33.orig/Makefile.in 2015-05-23 13:11:31.000000000 +0200
+++ fossil-src-1.33/Makefile.in 2015-05-23 13:53:28.251995600 +0200
@@ -39,7 +39,7 @@
TCLSH = tclsh
CFLAGS = @CFLAGS@
-LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
+LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ -lws2_32
BCCFLAGS = @CPPFLAGS@ @CFLAGS@
TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H
INSTALLDIR = $(DESTDIR)@prefix@/bin
--- fossil-src-1.33.orig/src/checkin.c 2015-05-23 13:11:31.000000000 +0200
+++ fossil-src-1.33/src/checkin.c 2015-05-23 13:54:26.116750700 +0200
@@ -938,15 +938,6 @@
if( zEditor==0 ){
zEditor = fossil_getenv("EDITOR");
}
-#if defined(_WIN32) || defined(__CYGWIN__)
- if( zEditor==0 ){
- zEditor = mprintf("%s\\notepad.exe", fossil_getenv("SYSTEMROOT"));
-#if defined(__CYGWIN__)
- zEditor = fossil_utf8_to_path(zEditor, 0);
- blob_add_cr(pPrompt);
-#endif
- }
-#endif
if( zEditor==0 ){
blob_append(pPrompt,
"#\n"
@@ -955,9 +946,6 @@
blob_str(&fname));
blob_reset(&fname);
}
-#if defined(_WIN32)
- blob_add_cr(pPrompt);
-#endif
blob_write_to_file(pPrompt, zFile);
if( zEditor ){
zCmd = mprintf("%s \"%s\"", zEditor, zFile);
@@ -1034,16 +1022,7 @@
int parent_rid
){
Blob prompt;
-#if defined(_WIN32) || defined(__CYGWIN__)
- int bomSize;
- const unsigned char *bom = get_utf8_bom(&bomSize);
- blob_init(&prompt, (const char *) bom, bomSize);
- if( zInit && zInit[0]){
- blob_append(&prompt, zInit, -1);
- }
-#else
blob_init(&prompt, zInit, -1);
-#endif
blob_append(&prompt,
"\n"
"# Enter a commit message for this check-in."
--- fossil-src-1.33.orig/src/db.c 2015-05-23 13:11:31.000000000 +0200
+++ fossil-src-1.33/src/db.c 2015-05-23 13:55:02.561878900 +0200
@@ -1254,44 +1254,31 @@
db_close_config();
}
zHome = fossil_getenv("FOSSIL_HOME");
-#if defined(_WIN32) || defined(__CYGWIN__)
if( zHome==0 ){
- zHome = fossil_getenv("LOCALAPPDATA");
- if( zHome==0 ){
- zHome = fossil_getenv("APPDATA");
- if( zHome==0 ){
- char *zDrive = fossil_getenv("HOMEDRIVE");
- char *zPath = fossil_getenv("HOMEPATH");
- if( zDrive && zPath ) zHome = mprintf("%s%s", zDrive, zPath);
- }
- }
+ zHome = fossil_getenv("HOME");
}
if( zHome==0 ){
if( isOptional ) return 0;
fossil_fatal("cannot locate home directory - please set the "
- "FOSSIL_HOME, LOCALAPPDATA, APPDATA, or HOMEPATH "
+ "FOSSIL_HOME, USERPROFILE or HOME "
"environment variables");
}
-#else
+
if( zHome==0 ){
- zHome = fossil_getenv("HOME");
+ zHome = fossil_getenv("USERPROFILE");
}
if( zHome==0 ){
if( isOptional ) return 0;
fossil_fatal("cannot locate home directory - please set the "
"FOSSIL_HOME or HOME environment variables");
}
-#endif
+
if( file_isdir(zHome, ExtFILE)!=1 ){
if( isOptional ) return 0;
fossil_fatal("invalid home directory: %s", zHome);
}
-#if defined(_WIN32) || defined(__CYGWIN__)
- /* . filenames give some window systems problems and many apps problems */
- zDbName = mprintf("%//_fossil", zHome);
-#else
+
zDbName = mprintf("%s/.fossil", zHome);
-#endif
if( file_size(zDbName, ExtFILE)<1024*3 ){
if( file_access(zHome, W_OK) ){
if( isOptional ) return 0;
@@ -2689,11 +2676,7 @@
allowSymlinks = -1; /* Use non-versioned settings only. */
}
-#if defined(_WIN32) || defined(__CYGWIN__)
-# define LOCALDB_NAME "./_FOSSIL_"
-#else
# define LOCALDB_NAME "./.fslckout"
-#endif
db_init_database(LOCALDB_NAME, zLocalSchema,
#ifdef FOSSIL_LOCAL_WAL
"COMMIT; PRAGMA journal_mode=WAL; BEGIN;",
--- fossil-src-1.33.orig/src/diffcmd.c 2015-05-23 13:11:31.000000000 +0200
+++ fossil-src-1.33/src/diffcmd.c 2015-05-23 13:53:28.276997700 +0200
@@ -606,11 +606,7 @@
const char *zName;
if( guiDiff ){
-#if defined(_WIN32)
- zDefault = "WinDiff.exe";
-#else
zDefault = 0;
-#endif
zName = "gdiff-command";
}else{
zDefault = 0;
--- fossil-src-1.33.orig/src/stash.c 2015-05-23 13:11:31.000000000 +0200
+++ fossil-src-1.33/src/stash.c 2015-05-23 13:53:28.278995500 +0200
@@ -160,13 +160,7 @@
if( zComment==0 ){
Blob prompt; /* Prompt for stash comment */
Blob comment; /* User comment reply */
-#if defined(_WIN32) || defined(__CYGWIN__)
- int bomSize;
- const unsigned char *bom = get_utf8_bom(&bomSize);
- blob_init(&prompt, (const char *) bom, bomSize);
-#else
blob_zero(&prompt);
-#endif
blob_append(&prompt,
"\n"
"# Enter a description of what is being stashed. Lines beginning\n"