Mercurial > mxe-octave
comparison src/msvc-dbus-1.patch @ 3108:acee522701c0
[MSVC] enable dbus compilation
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Fri, 28 Jun 2013 21:14:15 -0400 |
parents | |
children | 42a34b8928a6 |
comparison
equal
deleted
inserted
replaced
3107:fcfbd9fe9d6d | 3108:acee522701c0 |
---|---|
1 diff -ur dbus-1.6.8-orig/dbus/Makefile.in dbus-1.6.8/dbus/Makefile.in | |
2 --- dbus-1.6.8-orig/dbus/Makefile.in 2012-09-28 15:45:15 -0400 | |
3 +++ dbus-1.6.8/dbus/Makefile.in 2013-06-28 20:27:45 -0400 | |
4 @@ -614,7 +614,7 @@ | |
5 @DBUS_WIN_FALSE@no_undefined = | |
6 @DBUS_WIN_TRUE@no_undefined = -no-undefined | |
7 @DBUS_WIN_FALSE@export_symbols = -export-symbols-regex "^[^_].*" | |
8 -@DBUS_WIN_TRUE@export_symbols = | |
9 +@DBUS_WIN_TRUE@export_symbols = -export-symbols-regex "xXx" | |
10 @DBUS_WIN_TRUE@libdbus_1_la_DEPENDENCIES = $(dbus_res) | |
11 @DBUS_WIN_FALSE@intllibs = @LTLIBINTL@ | |
12 @DBUS_WIN_TRUE@intllibs = | |
13 diff -ur dbus-1.6.8-orig/dbus/dbus-sysdeps-util-win.c dbus-1.6.8/dbus/dbus-sysdeps-util-win.c | |
14 --- dbus-1.6.8-orig/dbus/dbus-sysdeps-util-win.c 2012-09-28 15:17:25 -0400 | |
15 +++ dbus-1.6.8/dbus/dbus-sysdeps-util-win.c 2013-06-28 20:38:39 -0400 | |
16 @@ -105,7 +105,7 @@ | |
17 return FALSE; | |
18 } | |
19 | |
20 - if (snprintf (pidstr, sizeof (pidstr), "%lu\n", pid) < 0) | |
21 + if (_snprintf (pidstr, sizeof (pidstr), "%lu\n", pid) < 0) | |
22 { | |
23 dbus_set_error (error, _dbus_error_from_system_errno (), | |
24 "Failed to format PID for \"%s\": %s", cfilename, | |
25 diff -ur dbus-1.6.8-orig/dbus/dbus-sysdeps-win.c dbus-1.6.8/dbus/dbus-sysdeps-win.c | |
26 --- dbus-1.6.8-orig/dbus/dbus-sysdeps-win.c 2013-06-28 20:29:08 -0400 | |
27 +++ dbus-1.6.8/dbus/dbus-sysdeps-win.c 2013-06-28 20:32:42 -0400 | |
28 @@ -1517,7 +1517,7 @@ | |
29 host ? host : "*", port, _dbus_strerror_from_errno()); | |
30 goto failed; | |
31 } | |
32 - snprintf( portbuf, sizeof( portbuf ) - 1, "%d", addr.AddressIn.sin_port ); | |
33 + _snprintf( portbuf, sizeof( portbuf ) - 1, "%d", addr.AddressIn.sin_port ); | |
34 if (!_dbus_string_append(retport, portbuf)) | |
35 { | |
36 dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); | |
37 diff -ur dbus-1.6.8-orig/dbus/dbus-sysdeps.c dbus-1.6.8/dbus/dbus-sysdeps.c | |
38 --- dbus-1.6.8-orig/dbus/dbus-sysdeps.c 2012-09-28 15:31:05 -0400 | |
39 +++ dbus-1.6.8/dbus/dbus-sysdeps.c 2013-06-28 20:32:45 -0400 | |
40 @@ -59,6 +59,10 @@ | |
41 extern char **environ; | |
42 #endif | |
43 | |
44 +#ifdef _MSC_VER | |
45 +# define snprintf _snprintf | |
46 +#endif | |
47 + | |
48 /** | |
49 * @defgroup DBusSysdeps Internal system-dependent API | |
50 * @ingroup DBusInternals | |
51 diff -ur dbus-1.6.8-orig/tools/dbus-monitor.c dbus-1.6.8/tools/dbus-monitor.c | |
52 --- dbus-1.6.8-orig/tools/dbus-monitor.c 2012-09-28 15:17:26 -0400 | |
53 +++ dbus-1.6.8/tools/dbus-monitor.c 2013-06-28 20:43:14 -0400 | |
54 @@ -39,6 +39,10 @@ | |
55 | |
56 #ifdef DBUS_WIN | |
57 | |
58 +#ifdef _MSC_VER | |
59 +#define snprintf _snprintf | |
60 +#endif | |
61 + | |
62 /* gettimeofday is not defined on windows */ | |
63 #define DBUS_SECONDS_SINCE_1601 11644473600LL | |
64 #define DBUS_USEC_IN_SEC 1000000LL |