5 2007-05-21 Werner Koch <wk@g10code.com>
6 2007-06-30 Marcus Brinkmann <marcus@g10code.de>
8 * autogen.sh [--build-w32]: Disable bogofilter-plugin and
10 * src/common/w32lib.h: Undef "interface".
11 (w32_is_administrator): New prototype.
12 (gmtime_r, ctime_r, localtime_r, asctime_r): New macros.
13 * src/common/Makefile.am (arch_sources): Add w32_account.c.
14 * src/common/w32_account.c: New.
15 * src/common/utils.c (copy_dir) [W32]: Don't use symlinks.
17 * src/common/utils.h (superuser_p): New prototype.
18 * src/prefs_themes.c (prefs_themes_btn_remove_clicked_cb)
19 (prefs_themes_btn_install_clicked_cb): Replace getuid based test
21 * src/common/timing.h [G_OS_WIN32]: Include w32lib.h and implement
23 * src/gtk/Makefile.am (AM_CPPFLAGS): Add -I../common for version.h.
24 * src/Makefile.am (INCLUDES): Add -Icommon for version.h.
25 * src/msgcache.c [G_OS_WIN32]: Include w32lib.h instead of
26 sys/mman.h and define MAP_FAILED.
27 (msgcache_read_cache, msgcache_read_mark, msgcache_write)
28 [G_OS_WIN32]: Implement memory mapped file access.
29 * src/common/log.c [G_OS_WIN32]: Include <w32lib.h>.
30 * src/common/src/mbox.c [G_OS_WIN32]: Include <w32lib.h>.
31 * src/prefs_summaries.c [G_OS_WIN32]: Include <w32lib.h>.
32 * src/procheader.c [G_OS_WIN32]: Include <w32lib.h>.
34 * src/plugins/pgpcore/Makefile.am (INCLUDES): Add
35 -I$(top_builddir)/src/common.
36 * src/plugins/pgpcore/claws.def: Update.
37 * src/plugins/pgpcore/passphrase.c: Include w32lib.h instead of
38 windows.h. This so that we can fix problems in windows.h.
39 * src/plugins/pgpcore/sgpgme.c [G_OS_WIN32]: Do not include
41 * src/plugins/pgpcore/pgp_viewer.c: Ditto.
42 * src/plugins/pgpcore/plugin.def: Add
43 sgpgme_data_release_and_get_mem, prefs_gpg_enable_agent,
44 prefs_gpg_should_skip_encryption_warning,
45 prefs_gpg_add_skip_encryption_warning,
46 prefs_gpg_remove_skip_encryption_warning and plugin_provides.
48 * src/plugins/pgpinline/Makefile.am (INCLUDES): Add
49 -I$(top_builddir)/src/common.
50 * src/plugins/pgpinline/plugin.def: Add plugin_provides.
51 * src/plugins/pgpinline/claws.def: Update.
52 * src/plugins/pgpinline/mypgpcore.def: Update.
54 * src/plugins/pgpmime/Makefile.am (INCLUDES): Add
55 -I$(top_builddir)/src/common.
56 * src/plugins/pgpmime/plugin.def: Add plugin_provides.
57 * src/plugins/pgpmime/claws.def: Update.
58 * src/plugins/pgpmime/mypgpcore.def: Update.
61 diff -rupN claws-mail-2.10.0-orig/autogen.sh claws-mail-2.10.0/autogen.sh
62 --- claws-mail-2.10.0-orig/autogen.sh 2007-07-02 10:32:22.000000000 +0200
63 +++ claws-mail-2.10.0/autogen.sh 2007-07-03 18:31:59.000000000 +0200
64 @@ -40,6 +40,7 @@ if test "$1" = "--build-w32"; then
65 --disable-openssl --disable-dillo-viewer-plugin \
66 --disable-nls --disable-libetpan --disable-aspell \
67 --disable-trayicon-plugin --disable-spamassassin-plugin \
68 + --disable-bogofilter-plugin --disable-valgrind \
69 PKG_CONFIG_LIBDIR="$w32root/lib/pkgconfig"
72 diff -rupN claws-mail-2.10.0-orig/src/common/log.c claws-mail-2.10.0/src/common/log.c
73 --- claws-mail-2.10.0-orig/src/common/log.c 2007-07-02 10:32:17.000000000 +0200
74 +++ claws-mail-2.10.0/src/common/log.c 2007-07-03 18:31:59.000000000 +0200
85 #include <glib/gi18n.h>
86 diff -rupN claws-mail-2.10.0-orig/src/common/Makefile.am claws-mail-2.10.0/src/common/Makefile.am
87 --- claws-mail-2.10.0-orig/src/common/Makefile.am 2007-07-02 10:32:17.000000000 +0200
88 +++ claws-mail-2.10.0/src/common/Makefile.am 2007-07-03 18:31:59.000000000 +0200
89 @@ -5,7 +5,7 @@ if OS_WIN32
90 arch_sources = fnmatch.c \
91 w32_dirent.c w32_reg.c w32_signal.c w32_stat.c \
92 w32_stdio.c w32_stdlib.c w32_string.c w32_time.c \
93 - w32_unistd.c w32_wait.c
94 + w32_unistd.c w32_wait.c w32_account.c
95 arch_headers = fnmatch.h w32lib.h
98 diff -rupN claws-mail-2.10.0-orig/src/common/timing.h claws-mail-2.10.0/src/common/timing.h
99 --- claws-mail-2.10.0-orig/src/common/timing.h 2007-07-02 10:32:18.000000000 +0200
100 +++ claws-mail-2.10.0/src/common/timing.h 2007-07-03 18:31:59.000000000 +0200
106 #include <sys/time.h>
110 #define START_TIMING(str) do {} while(0);
111 #define END_TIMING() do {} while(0);
118 +/* no {} by purpose */
119 +#define START_TIMING(str) \
120 + LARGE_INTEGER frequency; \
121 + LARGE_INTEGER start; \
122 + LARGE_INTEGER end; \
123 + LARGE_INTEGER diff; \
124 + const char *timing_name=str; \
125 + QueryPerformanceFrequency (&frequency); \
126 + QueryPerformanceCounter (&start); \
128 +#define END_TIMING() \
129 + QueryPerformanceCounter (&end); \
130 + diff.QuadPart = (double) \
131 + ((end.QuadPart - start.QuadPart) \
132 + * (double)1000.0/(double)frequency.QuadPart); \
133 + debug_print("TIMING %s: %ds%03dms\n", \
134 + timing_name, (unsigned int) (diff.QuadPart / 1000000), \
135 + (unsigned int) ((diff.QuadPart / 1000) % 1000));
138 /* no {} by purpose */
139 #define START_TIMING(str) \
140 struct timeval start; \
141 struct timeval end; \
142 struct timeval diff; \
143 const char *timing_name=str; \
144 - gettimeofday(&start, NULL); \
145 + gettimeofday(&start, NULL);
148 #define END_TIMING() \
150 debug_print("TIMING %s %s: %ds%03dms\n", \
152 timing_name, (unsigned int)diff.tv_sec, \
153 - (unsigned int)diff.tv_usec/1000);
154 + (unsigned int)diff.tv_usec/1000);
156 #define END_TIMING() \
157 gettimeofday(&end, NULL); \
163 diff -rupN claws-mail-2.10.0-orig/src/common/utils.c claws-mail-2.10.0/src/common/utils.c
164 --- claws-mail-2.10.0-orig/src/common/utils.c 2007-07-02 10:32:18.000000000 +0200
165 +++ claws-mail-2.10.0/src/common/utils.c 2007-07-03 18:31:59.000000000 +0200
170 +# include <w32lib.h>
174 @@ -75,6 +76,18 @@ static gboolean debug_mode = FALSE;
175 static GSList *tempfiles=NULL;
178 +/* Return true if we are running as root. This function should beused
179 + instead of getuid () == 0. */
180 +gboolean superuser_p (void)
183 + return w32_is_administrator ();
191 #if !GLIB_CHECK_VERSION(2, 7, 0) && !defined(G_OS_UNIX)
192 gint g_chdir(const gchar *path)
193 @@ -4766,7 +4779,12 @@ gint copy_dir(const gchar *src, const gc
197 - } else if (g_file_test(old_file, G_FILE_TEST_IS_SYMLINK)) {
200 + /* Windows has no symlinks. Or well, Vista seems to
201 + have something like this but the semantics might be
202 + different. Thus we don't use it under Windows. */
203 + else if (g_file_test(old_file, G_FILE_TEST_IS_SYMLINK)) {
206 gchar *target = g_file_read_link(old_file, &error);
207 @@ -4777,7 +4795,9 @@ gint copy_dir(const gchar *src, const gc
211 - } else if (g_file_test(old_file, G_FILE_TEST_IS_DIR)) {
213 +#endif /*G_OS_WIN32*/
214 + else if (g_file_test(old_file, G_FILE_TEST_IS_DIR)) {
215 gint r = copy_dir(old_file, new_file);
218 diff -rupN claws-mail-2.10.0-orig/src/common/utils.h claws-mail-2.10.0/src/common/utils.h
219 --- claws-mail-2.10.0-orig/src/common/utils.h 2007-07-02 10:32:18.000000000 +0200
220 +++ claws-mail-2.10.0/src/common/utils.h 2007-07-03 18:31:59.000000000 +0200
221 @@ -204,6 +204,14 @@ gboolean debug_get_mode (void);
223 #define Xstr(x) Str(x)
226 +/* System related stuff. */
228 +gboolean superuser_p (void);
231 +/* String utilities. */
233 void list_free_strings (GList *list);
234 void slist_free_strings (GSList *list);
236 diff -rupN claws-mail-2.10.0-orig/src/common/w32_account.c claws-mail-2.10.0/src/common/w32_account.c
237 --- claws-mail-2.10.0-orig/src/common/w32_account.c 1970-01-01 01:00:00.000000000 +0100
238 +++ claws-mail-2.10.0/src/common/w32_account.c 2007-07-03 18:31:59.000000000 +0200
240 +/* w32_account.c - Account related W32 functions.
241 + Copyright (C) 2007 g10 Code GmbH
242 + Copyright (C) 1999-2005 Nullsoft, Inc.
244 + This software is provided 'as-is', without any express or implied
245 + warranty. In no event will the authors be held liable for any
246 + damages arising from the use of this software.
248 + Permission is granted to anyone to use this software for any
249 + purpose, including commercial applications, and to alter it and
250 + redistribute it freely, subject to the following restrictions:
252 + 1. The origin of this software must not be misrepresented; you must
253 + not claim that you wrote the original software. If you use this
254 + software in a product, an acknowledgment in the product
255 + documentation would be appreciated but is not required.
257 + 2. Altered source versions must be plainly marked as such, and must
258 + not be misrepresented as being the original software.
260 + 3. This notice may not be removed or altered from any source
263 + =======[ wk 2007-05-21 ]====
264 + The code for get_group_name has been taken from NSIS 2.05, module
265 + UserInfo.c. NSIS bears the above license and along with the
267 + This license applies to everything in the NSIS package, except where
269 + Thus we make this module available under the same license - note,
270 + that this lincese is fully compatibe with the GNU GPL 2.0.
282 +#define DIM(v) (sizeof(v)/sizeof((v)[0]))
286 +/* Return a malloced name of our user group. */
288 +get_group_name (void)
291 + TOKEN_GROUPS *ptg = NULL;
292 + DWORD cbTokenGroups;
294 + SID_IDENTIFIER_AUTHORITY SystemSidAuthority = { SECURITY_NT_AUTHORITY };
302 + /* Every user belongs to the users group, hence
303 + users comes before guests */
304 + {DOMAIN_ALIAS_RID_USERS, "User"},
305 + {DOMAIN_ALIAS_RID_GUESTS, "Guest"},
306 + {DOMAIN_ALIAS_RID_POWER_USERS, "Power"},
307 + {DOMAIN_ALIAS_RID_ADMINS, "Admin"}
312 + if (GetVersion() & 0x80000000)
314 + /* This is not NT; thus we are always Admin. */
317 + else if (OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &hThread)
318 + || OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hThread))
320 + /* With the token for the current thread or process in hand we
321 + query the size of the associated group information. Note
322 + that we expect an error because buffer has been passed as
323 + NULL. cbTokenGroups will then tell use the required size. */
324 + if (!GetTokenInformation (hThread, TokenGroups, NULL, 0, &cbTokenGroups)
325 + && GetLastError () == ERROR_INSUFFICIENT_BUFFER)
327 + ptg = GlobalAlloc (GPTR, cbTokenGroups);
330 + if (GetTokenInformation ( hThread, TokenGroups, ptg,
331 + cbTokenGroups, &cbTokenGroups))
334 + /* Now iterate through the list of groups for this
335 + access token looking for a match against the SID
336 + we created above. */
337 + for (i = 0; i < DIM (groups); i++)
341 + AllocateAndInitializeSid (&SystemSidAuthority,
343 + SECURITY_BUILTIN_DOMAIN_RID,
349 + for (j = 0; j < ptg->GroupCount; j++)
350 + if (EqualSid(ptg->Groups[j].Sid, psid))
351 + group = groups[i].name;
360 + CloseHandle(hThread);
363 + return group? strdup (group):NULL;
367 +/* Return true if we are an administrator. The chekc is done only
368 + once so if the current user has been hadded to the Administrator
369 + group the process needs to be rerstarted. */
371 +w32_is_administrator (void)
374 + static int is_admin;
378 + char *name = get_group_name ();
380 + if (name && !strcmp (name, "Admin"))
389 diff -rupN claws-mail-2.10.0-orig/src/common/w32lib.h claws-mail-2.10.0/src/common/w32lib.h
390 --- claws-mail-2.10.0-orig/src/common/w32lib.h 2007-07-02 10:32:18.000000000 +0200
391 +++ claws-mail-2.10.0/src/common/w32lib.h 2007-07-03 18:31:59.000000000 +0200
396 +2007-05-21 Werner Koch <wk@g10code.com>
398 + * src/common/w32_account.c: New.
400 + * src/common/w32lib.h: Undef "interface".
402 2005-11-17 Werner Koch <wk@g10code.com>
404 Add boilerplate text to all files and explain legal status.
409 +/* Mingw32 3.4.4 defines interface to struct and thus breaks our own
410 + use of that symbol. Undef it here. */
411 +#if defined(_BASETYPS_H) && defined(interface)
419 @@ -188,8 +201,18 @@ int kill( pid_t pid, int sig );
420 FILE *popen( const char *command, const char *type );
421 int pclose( FILE *stream );
423 +/*** w32_account.c ***/
424 +int w32_is_administrator (void);
427 char *read_w32_registry_string( char *parent, char *section, char *key );
428 char *get_content_type_from_registry_with_ext( char *ext );
431 +/* Simulate thread-safe versions of some functions. */
432 +#define gmtime_r(time, resultp) gmtime (time)
433 +#define localtime_r(time, resultp) localtime (time)
434 +#define asctime_r(time, buffer) asctime (time)
435 +#define ctime_r(time, buffer) ctime (time)
438 diff -rupN claws-mail-2.10.0-orig/src/exporthtml.c claws-mail-2.10.0/src/exporthtml.c
439 --- claws-mail-2.10.0-orig/src/exporthtml.c 2007-07-02 10:32:21.000000000 +0200
440 +++ claws-mail-2.10.0/src/exporthtml.c 2007-07-03 18:31:59.000000000 +0200
443 #include <glib/gi18n.h>
446 +# include <w32lib.h>
451 #include "exporthtml.h"
452 diff -rupN claws-mail-2.10.0-orig/src/gtk/Makefile.am claws-mail-2.10.0/src/gtk/Makefile.am
453 --- claws-mail-2.10.0-orig/src/gtk/Makefile.am 2007-07-02 10:32:15.000000000 +0200
454 +++ claws-mail-2.10.0/src/gtk/Makefile.am 2007-07-03 18:31:59.000000000 +0200
455 @@ -66,6 +66,7 @@ clawsgtkinclude_HEADERS = \
458 -I$(srcdir)/../common \
463 diff -rupN claws-mail-2.10.0-orig/src/Makefile.am claws-mail-2.10.0/src/Makefile.am
464 --- claws-mail-2.10.0-orig/src/Makefile.am 2007-07-03 18:28:46.000000000 +0200
465 +++ claws-mail-2.10.0/src/Makefile.am 2007-07-03 18:31:59.000000000 +0200
466 @@ -462,6 +462,7 @@ EXTRA_DIST = \
474 diff -rupN claws-mail-2.10.0-orig/src/mbox.c claws-mail-2.10.0/src/mbox.c
475 --- claws-mail-2.10.0-orig/src/mbox.c 2007-07-02 10:32:19.000000000 +0200
476 +++ claws-mail-2.10.0/src/mbox.c 2007-07-03 18:31:59.000000000 +0200
482 +# include <w32lib.h>
488 diff -rupN claws-mail-2.10.0-orig/src/msgcache.c claws-mail-2.10.0/src/msgcache.c
489 --- claws-mail-2.10.0-orig/src/msgcache.c 2007-07-02 10:32:18.000000000 +0200
490 +++ claws-mail-2.10.0/src/msgcache.c 2007-07-03 18:31:59.000000000 +0200
494 #include <glib/gi18n.h>
495 -#include <sys/mman.h>
497 +# include <w32lib.h>
498 +# define MAP_FAILED ((char *) -1)
500 +# include <sys/mman.h>
502 #include <sys/types.h>
503 #include <sys/stat.h>
505 @@ -621,8 +626,23 @@ MsgCache *msgcache_read_cache(FolderItem
506 map_len = st.st_size;
513 + HANDLE hFile, hMapping;
514 + hFile = (HANDLE) _get_osfhandle (fileno(fp));
515 + if (hFile == (HANDLE) -1)
517 + hMapping = CreateFileMapping(hFile, NULL, PAGE_WRITECOPY, 0, 0, NULL);
520 + cache_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
524 cache_data = mmap(NULL, map_len, PROT_READ, MAP_PRIVATE, fileno(fp), 0);
530 @@ -678,8 +698,12 @@ MsgCache *msgcache_read_cache(FolderItem
532 g_hash_table_insert(cache->msgid_table, msginfo->msgid, msginfo);
537 + UnmapViewOfFile((void*) cache_data);
539 munmap(cache_data, map_len);
542 while (fread(&num, sizeof(num), 1, fp) == 1) {
544 @@ -784,8 +808,23 @@ void msgcache_read_mark(MsgCache *cache,
545 map_len = st.st_size;
552 + HANDLE hFile, hMapping;
553 + hFile = (HANDLE) _get_osfhandle (fileno(fp));
554 + if (hFile == (HANDLE) -1)
556 + hMapping = CreateFileMapping(hFile, NULL, PAGE_WRITECOPY, 0, 0, NULL);
559 + cache_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
563 cache_data = mmap(NULL, map_len, PROT_READ, MAP_PRIVATE, fileno(fp), 0);
569 @@ -801,7 +840,11 @@ void msgcache_read_mark(MsgCache *cache,
570 msginfo->flags.perm_flags = perm_flags;
574 + UnmapViewOfFile((void*) cache_data);
576 munmap(cache_data, map_len);
579 while (fread(&num, sizeof(num), 1, fp) == 1) {
581 @@ -1011,16 +1054,49 @@ gint msgcache_write(const gchar *cache_f
582 if (msgcache_use_mmap_write && cache->memusage > 0) {
583 map_len = cache->memusage;
584 if (ftruncate(fileno(write_fps.cache_fp), (off_t)map_len) == 0) {
588 + HANDLE hFile, hMapping;
589 + hFile = (HANDLE) _get_osfhandle (fileno(write_fps.cache_fp));
590 + if (hFile == (HANDLE) -1)
592 + hMapping = CreateFileMapping(hFile, NULL, PAGE_READWRITE, 0, 0, NULL);
595 + cache_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
599 cache_data = mmap(NULL, map_len, PROT_WRITE, MAP_SHARED,
600 fileno(write_fps.cache_fp), 0);
603 if (cache_data != NULL && cache_data != MAP_FAILED) {
604 if (ftruncate(fileno(write_fps.mark_fp), (off_t)map_len) == 0) {
607 + HANDLE hFile, hMapping;
608 + hFile = (HANDLE) _get_osfhandle (fileno(write_fps.mark_fp));
609 + if (hFile == (HANDLE) -1)
611 + hMapping = CreateFileMapping(hFile, NULL, PAGE_READWRITE, 0, 0, NULL);
614 + mark_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
618 mark_data = mmap(NULL, map_len, PROT_WRITE, MAP_SHARED,
619 fileno(write_fps.mark_fp), 0);
622 if (mark_data == NULL || mark_data == MAP_FAILED) {
624 + UnmapViewOfFile((void*) cache_data);
626 munmap(cache_data, map_len);
631 @@ -1030,8 +1106,13 @@ gint msgcache_write(const gchar *cache_f
632 write_fps.cache_data = cache_data + ftell(write_fps.cache_fp);
633 write_fps.mark_data = mark_data + ftell(write_fps.mark_fp);
634 g_hash_table_foreach(cache->msgnum_table, msgcache_write_mmap_func, (gpointer)&write_fps);
636 + UnmapViewOfFile((void*) cache_data);
637 + UnmapViewOfFile((void*) mark_data);
639 munmap(cache_data, map_len);
640 munmap(mark_data, map_len);
642 ftruncate(fileno(write_fps.cache_fp), write_fps.cache_size);
643 ftruncate(fileno(write_fps.mark_fp), write_fps.mark_size);
645 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpcore/claws.def claws-mail-2.10.0/src/plugins/pgpcore/claws.def
646 --- claws-mail-2.10.0-orig/src/plugins/pgpcore/claws.def 2007-07-02 10:32:21.000000000 +0200
647 +++ claws-mail-2.10.0/src/plugins/pgpcore/claws.def 2007-07-03 18:31:59.000000000 +0200
649 LIBRARY CLAWS-MAIL.EXE
656 +check_plugin_version
663 +gtkut_get_options_frame
664 gtkut_stock_button_set_create
668 +label_window_destroy
669 mainwindow_get_mainwindow
670 manage_window_destroy
671 manage_window_focus_in
672 manage_window_focus_out
673 manage_window_set_transient
675 +mimeview_register_viewer_factory
676 +mimeview_unregister_viewer_factory
677 prefs_account_get_privacy_prefs
678 prefs_account_register_page
679 prefs_account_set_privacy_prefs
680 prefs_account_unregister_page
682 +prefs_button_toggled_reverse
685 prefs_file_close_revert
686 prefs_gtk_register_page
687 @@ -30,6 +41,12 @@ prefs_set_block_label
701 +textview_show_mime_part
702 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpcore/Makefile.am claws-mail-2.10.0/src/plugins/pgpcore/Makefile.am
703 --- claws-mail-2.10.0-orig/src/plugins/pgpcore/Makefile.am 2007-07-02 10:32:21.000000000 +0200
704 +++ claws-mail-2.10.0/src/plugins/pgpcore/Makefile.am 2007-07-03 18:31:59.000000000 +0200
705 @@ -72,6 +72,7 @@ pgpcore_la_LIBADD = $(cygwin_export_lib)
707 -I$(top_srcdir)/src \
708 -I$(top_srcdir)/src/common \
709 + -I$(top_builddir)/src/common \
710 -I$(top_srcdir)/src/gtk
713 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpcore/passphrase.c claws-mail-2.10.0/src/plugins/pgpcore/passphrase.c
714 --- claws-mail-2.10.0-orig/src/plugins/pgpcore/passphrase.c 2007-07-02 10:32:20.000000000 +0200
715 +++ claws-mail-2.10.0/src/plugins/pgpcore/passphrase.c 2007-07-03 18:31:59.000000000 +0200
718 #include <sys/types.h>
720 -#include <windows.h>
723 #include <sys/mman.h>
725 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpcore/pgp_viewer.c claws-mail-2.10.0/src/plugins/pgpcore/pgp_viewer.c
726 --- claws-mail-2.10.0-orig/src/plugins/pgpcore/pgp_viewer.c 2007-07-02 10:32:21.000000000 +0200
727 +++ claws-mail-2.10.0/src/plugins/pgpcore/pgp_viewer.c 2007-07-03 18:31:59.000000000 +0200
730 #include <glib/gi18n.h>
731 #include <sys/types.h>
732 -#include <sys/wait.h>
734 +# include <sys/wait.h>
736 #if (defined(__DragonFly__) || defined (__NetBSD__) || defined (__FreeBSD__) || defined (__OpenBSD__))
737 # include <sys/signal.h>
739 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpcore/plugin.def claws-mail-2.10.0/src/plugins/pgpcore/plugin.def
740 --- claws-mail-2.10.0-orig/src/plugins/pgpcore/plugin.def 2007-07-02 10:32:20.000000000 +0200
741 +++ claws-mail-2.10.0/src/plugins/pgpcore/plugin.def 2007-07-03 18:31:59.000000000 +0200
756 sgpgme_data_from_mimeinfo
757 + sgpgme_data_release_and_get_mem
758 sgpgme_decrypt_verify
759 sgpgme_get_encrypt_data
761 @@ -17,4 +19,8 @@ EXPORTS
762 sgpgme_verify_signature
764 gpgmegtk_passphrase_cb
765 + prefs_gpg_add_skip_encryption_warning
766 + prefs_gpg_enable_agent
767 + prefs_gpg_remove_skip_encryption_warning
768 + prefs_gpg_should_skip_encryption_warning
770 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpcore/sgpgme.c claws-mail-2.10.0/src/plugins/pgpcore/sgpgme.c
771 --- claws-mail-2.10.0-orig/src/plugins/pgpcore/sgpgme.c 2007-07-02 10:32:21.000000000 +0200
772 +++ claws-mail-2.10.0/src/plugins/pgpcore/sgpgme.c 2007-07-03 18:31:59.000000000 +0200
776 #include <sys/types.h>
777 -#include <sys/wait.h>
779 +# include <sys/wait.h>
781 #if (defined(__DragonFly__) || defined (__NetBSD__) || defined (__FreeBSD__) || defined (__OpenBSD__))
782 # include <sys/signal.h>
784 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpinline/claws.def claws-mail-2.10.0/src/plugins/pgpinline/claws.def
785 --- claws-mail-2.10.0-orig/src/plugins/pgpinline/claws.def 2007-07-02 10:32:20.000000000 +0200
786 +++ claws-mail-2.10.0/src/plugins/pgpinline/claws.def 2007-07-03 18:31:59.000000000 +0200
788 LIBRARY CLAWS-MAIL.EXE
790 +check_plugin_version
793 conv_get_locale_charset_str_no_utf8
794 @@ -8,6 +9,8 @@ debug_srcname
797 privacy_register_system
800 privacy_unregister_system
801 procmime_decode_content
802 procmime_encode_content
803 @@ -16,7 +19,3 @@ procmime_mimeinfo_get_parameter
804 procmime_mimeinfo_parent
806 procmime_write_mimeinfo
811 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpinline/Makefile.am claws-mail-2.10.0/src/plugins/pgpinline/Makefile.am
812 --- claws-mail-2.10.0-orig/src/plugins/pgpinline/Makefile.am 2007-07-02 10:32:20.000000000 +0200
813 +++ claws-mail-2.10.0/src/plugins/pgpinline/Makefile.am 2007-07-03 18:31:59.000000000 +0200
814 @@ -71,6 +71,7 @@ pgpinline_la_LIBADD = $(plugin_ldadd) $(
816 -I$(top_srcdir)/src \
817 -I$(top_srcdir)/src/common \
818 + -I$(top_builddir)/src/common \
819 -I$(top_srcdir)/src/gtk
822 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpinline/mypgpcore.def claws-mail-2.10.0/src/plugins/pgpinline/mypgpcore.def
823 --- claws-mail-2.10.0-orig/src/plugins/pgpinline/mypgpcore.def 2007-07-02 10:32:20.000000000 +0200
824 +++ claws-mail-2.10.0/src/plugins/pgpinline/mypgpcore.def 2007-07-03 18:31:59.000000000 +0200
828 - sgpgme_data_from_mimeinfo
829 - sgpgme_decrypt_verify
830 - sgpgme_get_encrypt_data
831 - sgpgme_setup_signers
832 - sgpgme_sigstat_gpgme_to_privacy
833 - sgpgme_sigstat_info_full
834 - sgpgme_sigstat_info_short
835 - sgpgme_verify_signature
836 - gpgmegtk_passphrase_cb
837 - prefs_gpg_get_config
840 +gpgmegtk_passphrase_cb
841 +prefs_gpg_add_skip_encryption_warning
842 +prefs_gpg_enable_agent
843 +prefs_gpg_get_config
844 +prefs_gpg_remove_skip_encryption_warning
845 +prefs_gpg_should_skip_encryption_warning
846 +sgpgme_data_release_and_get_mem
847 +sgpgme_decrypt_verify
848 +sgpgme_get_encrypt_data
849 +sgpgme_setup_signers
850 +sgpgme_sigstat_gpgme_to_privacy
851 +sgpgme_sigstat_info_full
852 +sgpgme_sigstat_info_short
853 +sgpgme_verify_signature
854 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpinline/plugin.def claws-mail-2.10.0/src/plugins/pgpinline/plugin.def
855 --- claws-mail-2.10.0-orig/src/plugins/pgpinline/plugin.def 2007-07-02 10:32:20.000000000 +0200
856 +++ claws-mail-2.10.0/src/plugins/pgpinline/plugin.def 2007-07-03 18:31:59.000000000 +0200
871 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpmime/claws.def claws-mail-2.10.0/src/plugins/pgpmime/claws.def
872 --- claws-mail-2.10.0-orig/src/plugins/pgpmime/claws.def 2007-07-02 10:32:21.000000000 +0200
873 +++ claws-mail-2.10.0/src/plugins/pgpmime/claws.def 2007-07-03 18:31:59.000000000 +0200
875 LIBRARY CLAWS-MAIL.EXE
878 +check_plugin_version
881 file_read_stream_to_str
882 @@ -8,6 +9,8 @@ generate_mime_boundary
885 privacy_register_system
888 privacy_unregister_system
889 procmime_mimeinfo_free_all
890 procmime_mimeinfo_get_parameter
891 @@ -15,7 +18,3 @@ procmime_mimeinfo_new
892 procmime_mimeinfo_parent
894 procmime_write_mimeinfo
899 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpmime/Makefile.am claws-mail-2.10.0/src/plugins/pgpmime/Makefile.am
900 --- claws-mail-2.10.0-orig/src/plugins/pgpmime/Makefile.am 2007-07-02 10:32:21.000000000 +0200
901 +++ claws-mail-2.10.0/src/plugins/pgpmime/Makefile.am 2007-07-03 18:31:59.000000000 +0200
902 @@ -70,6 +70,7 @@ pgpmime_la_LIBADD = $(plugin_ldadd) $(pg
904 -I$(top_srcdir)/src \
905 -I$(top_srcdir)/src/common \
906 + -I$(top_builddir)/src/common \
907 -I$(top_srcdir)/src/gtk
910 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpmime/mypgpcore.def claws-mail-2.10.0/src/plugins/pgpmime/mypgpcore.def
911 --- claws-mail-2.10.0-orig/src/plugins/pgpmime/mypgpcore.def 2007-07-02 10:32:21.000000000 +0200
912 +++ claws-mail-2.10.0/src/plugins/pgpmime/mypgpcore.def 2007-07-03 18:31:59.000000000 +0200
916 - sgpgme_data_from_mimeinfo
917 - sgpgme_decrypt_verify
918 - sgpgme_get_encrypt_data
919 - sgpgme_setup_signers
920 - sgpgme_sigstat_gpgme_to_privacy
921 - sgpgme_sigstat_info_full
922 - sgpgme_sigstat_info_short
923 - sgpgme_verify_signature
924 - gpgmegtk_passphrase_cb
925 - prefs_gpg_get_config
928 +gpgmegtk_passphrase_cb
929 +prefs_gpg_add_skip_encryption_warning
930 +prefs_gpg_enable_agent
931 +prefs_gpg_get_config
932 +prefs_gpg_remove_skip_encryption_warning
933 +prefs_gpg_should_skip_encryption_warning
934 +sgpgme_data_from_mimeinfo
935 +sgpgme_data_release_and_get_mem
936 +sgpgme_decrypt_verify
937 +sgpgme_get_encrypt_data
938 +sgpgme_setup_signers
939 +sgpgme_sigstat_gpgme_to_privacy
940 +sgpgme_sigstat_info_full
941 +sgpgme_sigstat_info_short
942 +sgpgme_verify_signature
943 diff -rupN claws-mail-2.10.0-orig/src/plugins/pgpmime/plugin.def claws-mail-2.10.0/src/plugins/pgpmime/plugin.def
944 --- claws-mail-2.10.0-orig/src/plugins/pgpmime/plugin.def 2007-07-02 10:32:21.000000000 +0200
945 +++ claws-mail-2.10.0/src/plugins/pgpmime/plugin.def 2007-07-03 18:31:59.000000000 +0200
959 diff -rupN claws-mail-2.10.0-orig/src/prefs_summaries.c claws-mail-2.10.0/src/prefs_summaries.c
960 --- claws-mail-2.10.0-orig/src/prefs_summaries.c 2007-07-02 10:32:18.000000000 +0200
961 +++ claws-mail-2.10.0/src/prefs_summaries.c 2007-07-03 18:31:59.000000000 +0200
964 #include <gdk/gdkkeysyms.h>
967 +# include <w32lib.h>
970 #include "prefs_common.h"
971 #include "prefs_gtk.h"
972 #include "prefs_summary_open.h"
973 diff -rupN claws-mail-2.10.0-orig/src/prefs_themes.c claws-mail-2.10.0/src/prefs_themes.c
974 --- claws-mail-2.10.0-orig/src/prefs_themes.c 2007-07-02 10:32:15.000000000 +0200
975 +++ claws-mail-2.10.0/src/prefs_themes.c 2007-07-03 18:31:59.000000000 +0200
976 @@ -445,7 +445,7 @@ static void prefs_themes_btn_remove_clic
977 tmp = g_path_get_basename(theme_str);
979 if (IS_SYSTEM_THEME(theme_str)) {
980 - if (getuid() != 0) {
981 + if (!superuser_p()) {
982 alertpanel_error(_("Only root can remove system themes"));
985 @@ -518,7 +518,7 @@ static void prefs_themes_btn_install_cli
986 if (G_ALERTALTERNATE != val)
989 - if (getuid() == 0) {
990 + if (superuser_p ()) {
991 val = alertpanel(alert_title,
992 _("Do you want to install theme for all users?"),
993 GTK_STOCK_NO, GTK_STOCK_YES, NULL);
994 diff -rupN claws-mail-2.10.0-orig/src/procheader.c claws-mail-2.10.0/src/procheader.c
995 --- claws-mail-2.10.0-orig/src/procheader.c 2007-07-02 10:32:19.000000000 +0200
996 +++ claws-mail-2.10.0/src/procheader.c 2007-07-03 18:31:59.000000000 +0200
999 #include <sys/stat.h>
1002 +# include <w32lib.h>
1005 #include "procheader.h"
1006 #include "procmsg.h"
1007 #include "codeconv.h"