Index: contrib/GoogleGears/Linux-Firefox3.6/gears-filesubmit-firefox36.diff
===================================================================
--- contrib/GoogleGears/Linux-Firefox3.6/gears-filesubmit-firefox36.diff	(revision 4070)
+++ contrib/GoogleGears/Linux-Firefox3.6/gears-filesubmit-firefox36.diff	(revision 4070)
@@ -0,0 +1,34 @@
+diff -aur gears/base/common/js_dom_element.cc gears/base/common/js_dom_element.cc
+--- gears/base/common/js_dom_element.cc	2010-07-08 12:13:09.000000000 -0300
++++ gears/base/common/js_dom_element.cc	2010-07-09 10:33:19.000000000 -0300
+@@ -170,7 +170,9 @@
+   if (NS_FAILED(nr)) { return false; }
+ 
+   // Verify unknown is a DOM HTML element
++#if !defined(BROWSER_FF36)
+   if (!VerifyNsContent(supports)) { return false; }
++#endif
+   dom_html_element_ = do_QueryInterface(supports);
+   if (dom_html_element_.get() == NULL) { return false; }
+ 
+diff -aur gears/tools/config.mk gears/tools/config.mk
+--- gears/tools/config.mk	2010-07-08 12:13:06.000000000 -0300
++++ gears/tools/config.mk	2010-07-09 10:41:20.000000000 -0300
+@@ -530,7 +530,7 @@
+ 
+ COMPILE_FLAGS_dbg = -g -O0
+ COMPILE_FLAGS_opt = -O2
+-COMPILE_FLAGS = -c -o $@ -fPIC -fmessage-length=0 -Wall -Werror $(COMPILE_FLAGS_$(MODE))
++COMPILE_FLAGS = -c -o $@ -fPIC -fmessage-length=0 -Wall $(COMPILE_FLAGS_$(MODE))
+ # NS_LITERAL_STRING does not work properly without this compiler option
+ COMPILE_FLAGS += -fshort-wchar
+ 
+@@ -663,7 +663,7 @@
+ # SAFARI-TEMP
+ # Need to re-enable -Werror for Safari port.
+ else
+-COMPILE_FLAGS += -Werror
++#COMPILE_FLAGS += -Werror
+ endif
+ 
+ CFLAGS = $(COMPILE_FLAGS)
Index: contrib/GoogleGears/Linux-Firefox3.6/gears-r3420-ff3-ff36.patch
===================================================================
--- contrib/GoogleGears/Linux-Firefox3.6/gears-r3420-ff3-ff36.patch	(revision 4070)
+++ contrib/GoogleGears/Linux-Firefox3.6/gears-r3420-ff3-ff36.patch	(revision 4070)
@@ -0,0 +1,85 @@
+Index: gears/localserver/common/localserver_db.cc
+===================================================================
+--- gears/localserver/common/localserver_db.cc	(revision 3420)
++++ gears/localserver/common/localserver_db.cc	(working copy)
+@@ -25,6 +25,7 @@
+ 
+ #include "gears/localserver/common/localserver_db.h"
+ 
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <time.h>
+ 
+Index: gears/tools/rules.mk
+===================================================================
+--- gears/tools/rules.mk	(revision 3420)
++++ gears/tools/rules.mk	(working copy)
+@@ -315,9 +315,9 @@
+   ifeq ($(ARCH),i386)
+ 	# We don't build for 64-bit Firefox2 (but we do build for 32-bit Firefox2
+ 	# and 64-bit Firefox3).
+-	$(MAKE) prereqs    BROWSER=FF2
+-	$(MAKE) genheaders BROWSER=FF2
+-	$(MAKE) modules    BROWSER=FF2
++#	$(MAKE) prereqs    BROWSER=FF2
++#	$(MAKE) genheaders BROWSER=FF2
++#	$(MAKE) modules    BROWSER=FF2
+   endif
+ 
+ 	$(MAKE) prereqs    BROWSER=FF3
+@@ -1277,7 +1277,7 @@
+ 	"mkdir" -p $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/lib/ff36
+ 	"mkdir" -p $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/lib/ff35
+ 	"mkdir" -p $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/lib/ff30
+-	"mkdir" -p $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/lib/ff2
++#	"mkdir" -p $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/lib/ff2
+ 	cp base/firefox/static_files/components/stub.js $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/components
+ 	cp base/firefox/static_files/components/bootstrap.js $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/components
+ 	cp base/firefox/static_files/lib/updater.js $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/lib
+@@ -1301,7 +1301,7 @@
+ 	cp $(FF31_MODULE_DLL) $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/lib/ff35/$(DLL_PREFIX)$(MODULE)$(DLL_SUFFIX)
+ 	cp $(FF3_MODULE_DLL) $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/lib/ff30/$(DLL_PREFIX)$(MODULE)$(DLL_SUFFIX)
+ ifneq ($(ARCH),x86_64)
+-	cp $(FF2_MODULE_DLL) $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/lib/ff2/$(DLL_PREFIX)$(MODULE)$(DLL_SUFFIX)
++#	cp $(FF2_MODULE_DLL) $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/lib/ff2/$(DLL_PREFIX)$(MODULE)$(DLL_SUFFIX)
+ endif
+ ifeq ($(OS),osx)
+ 	cp $(OSX_LAUNCHURL_EXE) $(INSTALLERS_OUTDIR)/$(INSTALLER_BASE_NAME)/resources/
+Index: gears/base/common/http_utils.cc
+===================================================================
+--- gears/base/common/http_utils.cc	(revision 3420)
++++ gears/base/common/http_utils.cc	(working copy)
+@@ -753,7 +753,8 @@
+       const char *space = (char *) memchr(line, ' ', line_end - line);
+       if (space) {
+         char *errpos;
+-        strtol(space + 1, &errpos, 10);
++		int asdf;
++        asdf = strtol(space + 1, &errpos, 10);
+         if (isspace(*errpos) && errpos > space + 1) {
+           good_first_line = true;
+           num_headers++;
+Index: third_party/sqlite_google/src/os_unix.c
+===================================================================
+--- third_party/sqlite_google/src/os_unix.c	(revision 3420)
++++ third_party/sqlite_google/src/os_unix.c	(working copy)
+@@ -685,7 +685,8 @@
+   ** the first page of the database, no damage is done.
+   */
+   if( statbuf.st_size==0 ){
+-    write(fd, "S", 1);
++	int asdf;
++    asdf = write(fd, "S", 1);
+     rc = fstat(fd, &statbuf);
+     if( rc!=0 ){
+       return SQLITE_IOERR;
+@@ -2627,7 +2628,8 @@
+       pid = getpid();
+       memcpy(&zBuf[sizeof(t)], &pid, sizeof(pid));
+     }else{
+-      read(fd, zBuf, nBuf);
++	  int asdf;
++      asdf = read(fd, zBuf, nBuf);
+       close(fd);
+     }
+   }
Index: contrib/GoogleGears/Linux-Firefox3.6/gears-gcc433.diff
===================================================================
--- contrib/GoogleGears/Linux-Firefox3.6/gears-gcc433.diff	(revision 4070)
+++ contrib/GoogleGears/Linux-Firefox3.6/gears-gcc433.diff	(revision 4070)
@@ -0,0 +1,175 @@
+Index: gears/geolocation/backoff_manager.cc
+===================================================================
+--- gears/geolocation/backoff_manager.cc	(revision 3373)
++++ gears/geolocation/backoff_manager.cc	(working copy)
+@@ -26,6 +26,7 @@
+ #include "gears/geolocation/backoff_manager.h"
+ 
+ #include <assert.h>
++#include <stdlib.h>
+ 
+ // The baseline minimum period between network requests.
+ static const int kBaselineMinimumRequestInterval = 1000 * 5;  // 5 seconds
+Index: gears/cctests/test.cc
+===================================================================
+--- gears/cctests/test.cc	(revision 3373)
++++ gears/cctests/test.cc	(working copy)
+@@ -700,15 +700,15 @@
+ 
+   bool ok = false;
+   JsParamType t = context->GetArgumentType(1);
+-  if (type == STRING16(L"bool") && t == JSPARAM_BOOL ||
+-      type == STRING16(L"int") && t == JSPARAM_INT ||
+-      type == STRING16(L"double") && t == JSPARAM_DOUBLE ||
+-      type == STRING16(L"string") && t == JSPARAM_STRING16 ||
+-      type == STRING16(L"null") && t == JSPARAM_NULL ||
+-      type == STRING16(L"undefined") && t == JSPARAM_UNDEFINED ||
+-      type == STRING16(L"array") && t == JSPARAM_ARRAY ||
+-      type == STRING16(L"function") && t == JSPARAM_FUNCTION ||
+-      type == STRING16(L"object") && t == JSPARAM_OBJECT) {
++  if ((type == STRING16(L"bool") && t == JSPARAM_BOOL) ||
++      (type == STRING16(L"int") && t == JSPARAM_INT) ||
++      (type == STRING16(L"double") && t == JSPARAM_DOUBLE) ||
++      (type == STRING16(L"string") && t == JSPARAM_STRING16) ||
++      (type == STRING16(L"null") && t == JSPARAM_NULL) ||
++      (type == STRING16(L"undefined") && t == JSPARAM_UNDEFINED) ||
++      (type == STRING16(L"array") && t == JSPARAM_ARRAY) ||
++      (type == STRING16(L"function") && t == JSPARAM_FUNCTION) ||
++      (type == STRING16(L"object") && t == JSPARAM_OBJECT)) {
+     ok = true;
+   }
+   context->SetReturnValue(JSPARAM_BOOL, &ok);
+Index: gears/desktop/desktop.cc
+===================================================================
+--- gears/desktop/desktop.cc	(revision 3373)
++++ gears/desktop/desktop.cc	(working copy)
+@@ -216,14 +216,14 @@
+   }
+ 
+   // Resolve the icon urls
+-  if (!shortcut_info->icon16x16.url.empty() &&
+-      !ResolveUrl(&shortcut_info->icon16x16.url, &error_) ||
+-      !shortcut_info->icon32x32.url.empty() &&
+-      !ResolveUrl(&shortcut_info->icon32x32.url, &error_) ||
+-      !shortcut_info->icon48x48.url.empty() &&
+-      !ResolveUrl(&shortcut_info->icon48x48.url, &error_) ||
+-      !shortcut_info->icon128x128.url.empty() &&
+-      !ResolveUrl(&shortcut_info->icon128x128.url, &error_)) {
++  if ((!shortcut_info->icon16x16.url.empty() &&
++      !ResolveUrl(&shortcut_info->icon16x16.url, &error_)) ||
++      (!shortcut_info->icon32x32.url.empty() &&
++      !ResolveUrl(&shortcut_info->icon32x32.url, &error_)) ||
++      (!shortcut_info->icon48x48.url.empty() &&
++      !ResolveUrl(&shortcut_info->icon48x48.url, &error_)) ||
++      (!shortcut_info->icon128x128.url.empty() &&
++      !ResolveUrl(&shortcut_info->icon128x128.url, &error_))) {
+     return false;
+   }
+ 
+Index: gears/base/common/string16.h
+===================================================================
+--- gears/base/common/string16.h	(revision 3373)
++++ gears/base/common/string16.h	(working copy)
+@@ -46,6 +46,7 @@
+ #define GEARS_BASE_COMMON_STRING16_H__
+ 
+ #include <string>
++#include <string.h>
+ #include "gears/base/common/basictypes.h"
+ 
+ // Need to cast literals (Linux, OSX) and SQLite void* retvals (all platforms)
+Index: gears/base/common/string_utils.cc
+===================================================================
+--- gears/base/common/string_utils.cc	(revision 3373)
++++ gears/base/common/string_utils.cc	(working copy)
+@@ -25,6 +25,7 @@
+ 
+ #include "gears/base/common/string_utils.h"
+ #include "third_party/convert_utf/ConvertUTF.h"
++#include <limits.h>
+ 
+ #if defined(OS_ANDROID)
+ // Android is missing wcslen. This is just a wide character strlen.
+Index: gears/base/common/http_utils.cc
+===================================================================
+--- gears/base/common/http_utils.cc	(revision 3373)
++++ gears/base/common/http_utils.cc	(working copy)
+@@ -27,6 +27,7 @@
+ 
+ #include <iterator>
+ #include <vector>
++#include <stdlib.h>
+ #include "gears/base/common/http_utils.h"
+ 
+ // ----------------------------------------------------------------------
+Index: third_party/jsoncpp/json_reader.cc
+===================================================================
+--- third_party/jsoncpp/json_reader.cc	(revision 3373)
++++ third_party/jsoncpp/json_reader.cc	(working copy)
+@@ -3,6 +3,7 @@
+ #include <utility>
+ #include <stdio.h>
+ #include <assert.h>
++#include <string.h>
+ 
+ #if _MSC_VER >= 1400 // VC++ 8.0
+ #pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
+Index: third_party/jsoncpp/json_value.cc
+===================================================================
+--- third_party/jsoncpp/json_value.cc	(revision 3373)
++++ third_party/jsoncpp/json_value.cc	(working copy)
+@@ -1,6 +1,7 @@
+ #include "third_party/jsoncpp/value.h"
+ #include "third_party/jsoncpp/writer.h"
+ #include <utility>
++#include <string.h>
+ #include "assert.h"
+ #ifdef JSON_USE_CPPTL
+ # include <cpptl/conststring.h>
+Index: third_party/jsoncpp/json_writer.cc
+===================================================================
+--- third_party/jsoncpp/json_writer.cc	(revision 3373)
++++ third_party/jsoncpp/json_writer.cc	(working copy)
+@@ -2,6 +2,7 @@
+ #include <utility>
+ #include <assert.h>
+ #include <stdio.h>
++#include <string.h>
+ 
+ #if _MSC_VER >= 1400 // VC++ 8.0
+ #pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
+Index: third_party/skia/src/core/SkDebug_stdio.cpp
+===================================================================
+--- third_party/skia/src/core/SkDebug_stdio.cpp	(revision 3373)
++++ third_party/skia/src/core/SkDebug_stdio.cpp	(working copy)
+@@ -49,12 +49,13 @@
+ 
+ void SkDebugf(const char format[], ...)
+ {
+-    char    buffer[kBufferSize + 1];
++//    char    buffer[kBufferSize + 1];
+     va_list args;
+     va_start(args, format);
+-    vsnprintf(buffer, kBufferSize, format, args);
++//    vsnprintf(buffer, kBufferSize, format, args);
++    vfprintf(stderr, format, args);
+     va_end(args);
+-    fprintf(stderr, buffer);
++//    fprintf(stderr, buffer);
+ }
+ 
+ #endif
+Index: third_party/googleurl/src/url_parse.cc
+===================================================================
+--- third_party/googleurl/src/url_parse.cc	(revision 3373)
++++ third_party/googleurl/src/url_parse.cc	(working copy)
+@@ -38,7 +38,9 @@
+ 
+ #include "base/logging.h"
+ #include "googleurl/src/url_parse_internal.h"
++#include <cstdlib>
+ 
++
+ namespace url_parse {
+ 
+ namespace {
Index: contrib/GoogleGears/Linux-Firefox3.6/instrucoes.txt
===================================================================
--- contrib/GoogleGears/Linux-Firefox3.6/instrucoes.txt	(revision 4070)
+++ contrib/GoogleGears/Linux-Firefox3.6/instrucoes.txt	(revision 4070)
@@ -0,0 +1,42 @@
+InstruÃ§oes de Build Para Linux
+
+Essa versÃ£o corrige o problema de enviar anexos arquivados no Expresso no Firefox 3.6
+
+- Baixar o gears de ftp://ftpserver.cta.serpro/pub/global/GoogleGears/Linux-Firefox3.6/Source/gears-r3427.tar.gz e descompactar
+
+- Aplicar os patchs na seguinte ordem:
+ftp://ftpserver.cta.serpro/pub/global/GoogleGears/Linux-Firefox3.6/Source/gears-gcc433.diff
+ftp://ftpserver.cta.serpro/pub/global/GoogleGears/Linux-Firefox3.6/Source/gears-r3420-ff3-ff36.patch
+ftp://ftpserver.cta.serpro/pub/global/GoogleGears/Linux-Firefox3.6/Source/gears-filesubmit-firefox36.diff
+
+- chmod +x third_party/gecko_*/linux/gecko_sdk/bin/*
+
+-make -C gears clean
+
+-make -C gears -j3 MODE=opt OS=linux
+
+ls -l ./gears/bin-opt/installers/*.xpi
+
+
+
+----------------------------
+
+Para fazer uma versÃ£o de depuracao
+
+- make -C gears -j3 MODE=dbg OS=linux
+- ls -l ./gears/bin-dbg/installers/*.xpi
+
+- para depurar
+- export NSPR_LOG_MODULES=gears:5
+- export NSPR_LOG_FILE=/tmp/gears.log
+- firefox
+
+Analisar o arquivo /tmp/gears.log
+Ã uma boa dica utilizar o firebug para verificar em qual funcao o erro estÃ¡ ocorrendo.
+
+
+
+
+
+
+
Index: contrib/GoogleGears/Win32-Firefox3.6/gears-r3427.tar.gz
===================================================================
--- contrib/GoogleGears/Win32-Firefox3.6/gears-r3427.tar.gz	(revision 4070)
+++ contrib/GoogleGears/Win32-Firefox3.6/gears-r3427.tar.gz	(revision 4070)
@@ -0,0 +1,1 @@
+link ../../Linux-Firefox3.6/Source/gears-r3427.tar.gz
Index: contrib/GoogleGears/Win32-Firefox3.6/BuildGearsFirefox3.6Win32.txt
===================================================================
--- contrib/GoogleGears/Win32-Firefox3.6/BuildGearsFirefox3.6Win32.txt	(revision 4070)
+++ contrib/GoogleGears/Win32-Firefox3.6/BuildGearsFirefox3.6Win32.txt	(revision 4070)
@@ -0,0 +1,31 @@
+Para compilar o Google Gears ( Firefox 3.6 - Win32) :
+
+Pré-requisitos :
+
+  - Visual Studio VS 2005
+  - Microsoft Platform SDK for Windows Server 2003 R2
+  - Wix 3.0.2925 - http://wix.sourceforge.net/downloadv3.html
+  - ProjectAggregator 2 - http://wix.codeplex.com/releases/view/44406#DownloadId=119163
+  - Python 2.4 - http://www.python.org/ftp/python/2.4.4/python-2.4.4.msi
+  - Unxutils + UnxUpdates - http://gears.googlecode.com/files/UnxUtils.zip
+  - Código fonte do Google Geas (SVN)
+
+Editar o arquivo gears/base/common/js_dom_element.cc linha 170 :
+
+    // Verify unknown is a DOM HTML element
+  +#if !defined(BROWSER_FF36)
+     if (!VerifyNsContent(supports)) { return false; }
+  +#endif
+     dom_html_element_ = do_QueryInterface(supports);
+     if (dom_html_element_.get() == NULL) { return false; }
+
+Executar prompt DOS :
+
+  - cd\<diretório fonte do gears>
+  - "C:\Arquivos de programas\Microsoft Visual Studio 8\VC\vcvarsall.bat"
+  - "C:\Arquivos de programas\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.cmd"
+  -  set PATH=%PATH%;C:\Python24;C:\Arquivos de programas\Windows Installer XML v3\bin;C:\unix\usr\local\wbin
+
+  - make MODE=opt
+
+  Os arquivos MSI e XPI serão gerados no diretório .\bin-opt\installers
