On 10/03/2010 13:02, Daniel Palacio wrote:
[695250] adding definition EventWriteTCP_CONNECTION_KEEPALIVE
[695251] adding definition EventWriteTCP_CONNECTION_OFFLOAD_PMAX
htags: cannot write to database.
Oops, my fault - I didn't emulate mkstemp correctly.
Attached is the complete Windows diff for 5.8.1, with a
new htags.exe on my site.
Jason.
diff -ur global-5.8.1/libdb/bt_open.c global-5.8-1/libdb/bt_open.c
--- global-5.8.1/libdb/bt_open.c Sat Mar 06 21:08:14 2010
+++ global-5.8-1/libdb/bt_open.c Fri Mar 12 17:08:11 2010
@@ -67,7 +67,8 @@
#endif
#if (defined(_WIN32) && !defined(__CYGWIN__))
-#define mkstemp(p) open(_mktemp(p), _O_CREAT | _O_SHORT_LIVED | _O_EXCL)
+#include <share.h>
+#define mkstemp(p) open(_mktemp(p), _O_CREAT | _O_RDWR | _O_BINARY |
_O_TEMPORARY, _S_IWRITE | _SH_DENYRW)
#endif
#include "db.h"
diff -ur global-5.8.1/libutil/conf.c global-5.8-1/libutil/conf.c
--- global-5.8.1/libutil/conf.c Sat Mar 06 21:08:14 2010
+++ global-5.8-1/libutil/conf.c Fri Mar 12 10:51:00 2010
@@ -417,7 +417,22 @@
strbuf_puts(sb, BINDIR);
exist = 1;
} else if (!strcmp(name, "datadir")) {
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ /*
+ * Test if this directory exists, and if not, take the
+ * directory relative to the binary.
+ */
+ if (test("d", DATADIR))
+ strbuf_puts(sb, DATADIR);
+ else {
+ const char *name = strrchr(_pgmptr, '\\');
+ if (name)
+ strbuf_nputs(sb, _pgmptr, name+1 -
_pgmptr);
+ strbuf_puts(sb, "..\\share");
+ }
+#else
strbuf_puts(sb, DATADIR);
+#endif
exist = 1;
}
}
diff -ur global-5.8.1/plugin-example/exuberant-ctags.c
global-5.8-1/plugin-example/exuberant-ctags.c
--- global-5.8.1/plugin-example/exuberant-ctags.c Sat Mar 06 21:08:14 2010
+++ global-5.8-1/plugin-example/exuberant-ctags.c Mon Mar 08 17:27:24 2010
@@ -22,7 +22,9 @@
#include <config.h>
#endif
#include <sys/types.h>
+#if !defined(_WIN32) || defined(__CYGWIN__)
#include <sys/wait.h>
+#endif
#include <assert.h>
#include <ctype.h>
#include <errno.h>
_______________________________________________
Bug-global mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-global