[Gpg4win-commits] r403 - in trunk: . patches/glib-2.12.12
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sun May 20 23:15:59 CEST 2007
Author: marcus
Date: 2007-05-20 23:15:59 +0200 (Sun, 20 May 2007)
New Revision: 403
Added:
trunk/patches/glib-2.12.12/01-giowin32.patch
trunk/patches/glib-2.12.12/02-gspawn-w32.patch
trunk/patches/glib-2.12.12/03-gspawn-w32-fixup.patch
Modified:
trunk/ChangeLog
trunk/Makefile.am
Log:
2007-05-20 Marcus Brinkmann <marcus at g10code.de>
* patches/glib-2.12.12/01-giowin32.patch,
patches/glib-2.12.12/02-gspawn-w32.patch,
patches/glib-2.12.12/03-gspawn-w32-fixup.patch: New files.
* Makefile.am (EXTRA_DIST): Add these new files.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-05-20 16:40:30 UTC (rev 402)
+++ trunk/ChangeLog 2007-05-20 21:15:59 UTC (rev 403)
@@ -1,5 +1,10 @@
2007-05-20 Marcus Brinkmann <marcus at g10code.de>
+ * patches/glib-2.12.12/01-giowin32.patch,
+ patches/glib-2.12.12/02-gspawn-w32.patch,
+ patches/glib-2.12.12/03-gspawn-w32-fixup.patch: New files.
+ * Makefile.am (EXTRA_DIST): Add these new files.
+
* src/gpgwrap.c (build_commandline): New function.
(main): Quote argument vector.
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2007-05-20 16:40:30 UTC (rev 402)
+++ trunk/Makefile.am 2007-05-20 21:15:59 UTC (rev 403)
@@ -29,6 +29,9 @@
patches/glib-2.9.2-wk1/02-gspawn-w32.patch \
patches/glib-2.9.2-wk1/03-gspawn-w32-fixup.patch \
patches/glib-2.9.2-wk1/04-gspawn-w32-buffering.patch \
+ patches/glib-2.12.12/01-giowin32.patch \
+ patches/glib-2.12.12/02-gspawn-w32.patch \
+ patches/glib-2.12.12/03-gspawn-w32-fixup.patch \
patches/sylpheed-claws-2.3.1/01-locale-dir.patch \
patches/sylpheed-claws-2.3.1/02-fix-plugin-dir.patch \
patches/sylpheed-claws-2.3.1/03-std-plugins.patch \
Added: trunk/patches/glib-2.12.12/01-giowin32.patch
===================================================================
--- trunk/patches/glib-2.12.12/01-giowin32.patch 2007-05-20 16:40:30 UTC (rev 402)
+++ trunk/patches/glib-2.12.12/01-giowin32.patch 2007-05-20 21:15:59 UTC (rev 403)
@@ -0,0 +1,48 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+Fix a couple of buglets in the I/O channel implementation.
+
+(no changelog yet)
+
+diff -rup glib-2.12.12-old/glib/giowin32.c glib-2.12.12/glib/giowin32.c
+--- glib-2.12.12-old/glib/giowin32.c 2007-05-20 19:02:40.000000000 +0200
++++ glib-2.12.12/glib/giowin32.c 2007-05-20 19:02:40.000000000 +0200
+@@ -385,7 +385,7 @@
+ {
+ GIOWin32Channel *channel = parameter;
+ guchar *buffer;
+- guint nbytes;
++ gint nbytes;
+
+ g_io_channel_ref ((GIOChannel *)channel);
+
+@@ -457,7 +457,7 @@
+
+ if (nbytes <= 0)
+ break;
+-
++
+ channel->wrp = (channel->wrp + nbytes) % BUFFER_SIZE;
+ if (channel->debug)
+ g_print ("read_thread %#x: rdp=%d, wrp=%d, setting data_avail\n",
+@@ -496,7 +496,7 @@
+ {
+ GIOWin32Channel *channel = parameter;
+ guchar *buffer;
+- guint nbytes;
++ gint nbytes;
+
+ g_io_channel_ref ((GIOChannel *)channel);
+
+@@ -1975,7 +1975,7 @@
+
+ fd->fd = (gint) win32_channel->data_avail_event;
+
+- if (win32_channel->thread_id == 0 && (condition & G_IO_IN))
++ if (win32_channel->thread_id == 0)
+ {
+ if (condition & G_IO_IN)
+ create_thread (win32_channel, condition, read_thread);
+
Property changes on: trunk/patches/glib-2.12.12/01-giowin32.patch
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/patches/glib-2.12.12/02-gspawn-w32.patch
===================================================================
--- trunk/patches/glib-2.12.12/02-gspawn-w32.patch 2007-05-20 16:40:30 UTC (rev 402)
+++ trunk/patches/glib-2.12.12/02-gspawn-w32.patch 2007-05-20 21:15:59 UTC (rev 403)
@@ -0,0 +1,68 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+Fix calling of the spawn helper for W32.
+
+2006-01-12 Werner Koch <wk at g10code.com>
+
+ * glib/gspawn-win32.c (do_spawn_with_pipes): First try to load the
+ helper from the module's directory.
+
+
+diff -upr glib-2.9.2-wk1/glib/gspawn-win32.c glib/glib/gspawn-win32.c
+--- glib-2.9.2-wk1/glib/gspawn-win32.c 2005-09-07 12:10:49.000000000 +0200
++++ glib/glib/gspawn-win32.c 2006-01-13 09:14:48.000000000 +0100
+@@ -632,6 +632,7 @@ do_spawn_with_pipes (gint
+ GError *conv_error = NULL;
+ gint conv_error_index;
+ gchar *helper_process;
++ gchar *helper_process_buf = NULL;
+ CONSOLE_CURSOR_INFO cursor_info;
+
+ SETUP_DEBUG();
+@@ -678,6 +679,23 @@ do_spawn_with_pipes (gint
+ helper_process = HELPER_PROCESS "-console.exe";
+ else
+ helper_process = HELPER_PROCESS ".exe";
++
++ /* We better check whether the helper process is available in the
++ same directory as this library. Only if this is not the case we
++ try it without a path and hope that it can be found n PATH. */
++ helper_process_buf = g_malloc (MAX_PATH + 50 + strlen (helper_process));
++ if ( GetModuleFileNameA (0, helper_process_buf, MAX_PATH + 50) )
++ {
++ char *p = strrchr (helper_process_buf, '\\');
++ if (!p)
++ p = helper_process_buf;
++ else
++ p++;
++ strcpy (p, helper_process);
++ if (!g_access (helper_process_buf, X_OK))
++ helper_process = helper_process_buf; /* Yes, use that one. */
++ }
++
+ new_argv[0] = helper_process;
+ _g_sprintf (args[ARG_CHILD_ERR_REPORT], "%d", child_err_report_pipe[1]);
+ new_argv[ARG_CHILD_ERR_REPORT] = args[ARG_CHILD_ERR_REPORT];
+@@ -944,6 +962,7 @@ do_spawn_with_pipes (gint
+ if (rc != -1)
+ CloseHandle ((HANDLE) rc);
+
++ g_free (helper_process_buf);
+ return TRUE;
+
+ cleanup_and_fail:
+@@ -965,6 +984,7 @@ do_spawn_with_pipes (gint
+ close (stderr_pipe[0]);
+ if (stderr_pipe[1] != -1)
+ close (stderr_pipe[1]);
++ g_free (helper_process_buf);
+
+ return FALSE;
+ }
+
+
+
+
+
Property changes on: trunk/patches/glib-2.12.12/02-gspawn-w32.patch
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/patches/glib-2.12.12/03-gspawn-w32-fixup.patch
===================================================================
--- trunk/patches/glib-2.12.12/03-gspawn-w32-fixup.patch 2007-05-20 16:40:30 UTC (rev 402)
+++ trunk/patches/glib-2.12.12/03-gspawn-w32-fixup.patch 2007-05-20 21:15:59 UTC (rev 403)
@@ -0,0 +1,65 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+This patch is needed to complete 02-gspawn-w32.patch by Werner: When
+the complete path is used, it may contain spaces, and thus it needs to
+be quoted.
+
+2006-05-29 Marcus Brinkmann <marcus at g10code.com>
+
+ * glib/gspawn-win32.c (do_spawn_with_pipes): Protect the first
+ argument by quotes.
+
+diff -ru glib-2.9.2-wk1-orig/glib/gspawn-win32.c glib-2.9.2-wk1/glib/gspawn-win32.c
+--- glib-2.9.2-wk1-orig/glib/gspawn-win32.c 2006-05-29 00:12:10.000000000 +0200
++++ glib-2.9.2-wk1/glib/gspawn-win32.c 2006-05-29 00:13:16.000000000 +0200
+@@ -696,7 +696,7 @@
+ helper_process = helper_process_buf; /* Yes, use that one. */
+ }
+
+- new_argv[0] = helper_process;
++ new_argv[0] = protect_argv_string (helper_process);
+ _g_sprintf (args[ARG_CHILD_ERR_REPORT], "%d", child_err_report_pipe[1]);
+ new_argv[ARG_CHILD_ERR_REPORT] = args[ARG_CHILD_ERR_REPORT];
+
+@@ -800,6 +800,7 @@
+ g_error_free (conv_error);
+ g_strfreev (protected_argv);
+ g_free (new_argv[ARG_WORKING_DIRECTORY]);
++ g_free (new_argv[0]);
+ g_free (new_argv);
+ g_free (whelper);
+
+@@ -814,6 +815,7 @@
+ g_error_free (conv_error);
+ g_strfreev (protected_argv);
+ g_free (new_argv[ARG_WORKING_DIRECTORY]);
++ g_free (new_argv[0]);
+ g_free (new_argv);
+ g_free (whelper);
+ g_strfreev ((gchar **) wargv);
+@@ -855,6 +857,7 @@
+ g_error_free (conv_error);
+ g_strfreev (protected_argv);
+ g_free (new_argv[ARG_WORKING_DIRECTORY]);
++ g_free (new_argv[0]);
+ g_free (new_argv);
+
+ return FALSE;
+@@ -868,6 +871,7 @@
+ g_error_free (conv_error);
+ g_strfreev (protected_argv);
+ g_free (new_argv[ARG_WORKING_DIRECTORY]);
++ g_free (new_argv[0]);
+ g_free (new_argv);
+ g_strfreev (cpargv);
+
+@@ -899,6 +903,7 @@
+ g_strfreev (protected_argv);
+
+ g_free (new_argv[ARG_WORKING_DIRECTORY]);
++ g_free (new_argv[0]);
+ g_free (new_argv);
+
+ /* Check if gspawn-win32-helper couldn't be run */
Property changes on: trunk/patches/glib-2.12.12/03-gspawn-w32-fixup.patch
___________________________________________________________________
Name: svn:executable
+ *
More information about the Gpg4win-commits
mailing list