[Enigmail] Building enigmail on OS/2

Patrick Brunschwig patrick at enigmail.net
Thu Jan 5 02:27:24 PST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 05.01.12 04:47, Dave Yeo wrote:
> Hi, I'm trying to build enigmail trunk on OS/2. The build dies
> here, 
> G:/mozilla/mailnews/extensions/enigmail/ipc/src/nsPipeTransport.cpp:
>
> 
In member function 'nsresult
> nsPipeTransport::CopyArgsAndCreateProcess(const PRUnichar**,
> PRUint32, const PRUnichar**, PRUint32, PRFileDesc*, PRFileDesc*,
> PRFileDesc*)': 
> G:/mozilla/mailnews/extensions/enigmail/ipc/src/nsPipeTransport.cpp:1079:
>
> 
error: no matching function for call to
> 'nsCString_external::nsCString_external(const PRUnichar*&)' 
> ../../../../../mozilla/dist/include/nsStringAPI.h:913: note: 
> candidates are: nsCString_external::nsCString_external(const
> char*, PRUint32, PRUint32) 
> ../../../../../mozilla/dist/include/nsStringAPI.h:883: note: 
> nsCString_external::nsCString_external(const char*, PRUint32) 
> ../../../../../mozilla/dist/include/nsStringAPI.h:876: note: 
> nsCString_external::nsCString_external(const nsACString&) 
> ../../../../../mozilla/dist/include/nsStringAPI.h:869: note: 
> nsCString_external::nsCString_external(const nsCString_external&) 
> ../../../../../mozilla/dist/include/nsStringAPI.h:864: note: 
> nsCString_external::nsCString_external() 
> G:/mozilla/mailnews/extensions/enigmail/ipc/src/nsPipeTransport.cpp:1083:
>
> 
error: invalid initialization of reference of type 'const nsAString&'
> from expression of type 'nsCAutoString' 
> ../../../../../mozilla/dist/include/nsStringAPI.h:1000: error: in 
> passing argument 1 of 'char* ToNewUTF8String(const nsAString&)' 
> make.exe[3]: *** [nsPipeTransport.o] Error 
> 1G:/mozilla/mailnews/extensions/enigmail/ipc/src/nsPipeTransport.cpp:
>
> 
In member function 'nsresult
> nsPipeTransport::CopyArgsAndCreateProcess(const PRUnichar**,
> PRUint32, const PRUnichar**, PRUint32, PRFileDesc*, PRFileDesc*,
> PRFileDesc*)': 
> G:/mozilla/mailnews/extensions/enigmail/ipc/src/nsPipeTransport.cpp:1079:
>
> 
error: no matching function for call to
> 'nsCString_external::nsCString_external(const PRUnichar*&)' 
> ../../../../../mozilla/dist/include/nsStringAPI.h:913: note: 
> candidates are: nsCString_external::nsCString_external(const
> char*, PRUint32, PRUint32) 
> ../../../../../mozilla/dist/include/nsStringAPI.h:883: note: 
> nsCString_external::nsCString_external(const char*, PRUint32) 
> ../../../../../mozilla/dist/include/nsStringAPI.h:876: note: 
> nsCString_external::nsCString_external(const nsACString&) 
> ../../../../../mozilla/dist/include/nsStringAPI.h:869: note: 
> nsCString_external::nsCString_external(const nsCString_external&) 
> ../../../../../mozilla/dist/include/nsStringAPI.h:864: note: 
> nsCString_external::nsCString_external() 
> G:/mozilla/mailnews/extensions/enigmail/ipc/src/nsPipeTransport.cpp:1083:
>
> 
error: invalid initialization of reference of type 'const nsAString&'
> from expression of type 'nsCAutoString' 
> ../../../../../mozilla/dist/include/nsStringAPI.h:1000: error: in 
> passing argument 1 of 'char* ToNewUTF8String(const nsAString&)' 
> make.exe[3]: *** [nsPipeTransport.o] Error 1
> 
> Replacing the ifdef XP_OS2 with ifdef 0 and the compile runs to
> the finish. After building the xpi and installing in Thunderbird
> everything works except communicating with gpg.exe which I take as
> being due to using single quotes instead of double quotes in the
> piped command. Not sure how to fix this.

The code you disabled made this: if an argument contains spaces,
insert " at the start and the end of the argument.

Given that you disabled this, you should probably ensure that the path
to gpg.exe does not contain spaces.

Try to replace the #ifdef ... #endif with this here:

#ifndef XP_OS2
    nsAutoString tmpArg (args[j]);
    nsAutoString quote;
    quote.AssignASCII("\"");
    if (tmpArg.FindChar(' ', 0) >= 0) {
       tmpArg.Insert(quote, 0);
       tmpArg.Append(quote);
       argList[j+1] = ToNewUTF8String(tmpArg);
    }
    else {
        argList[j+1] = ToNewUTF8String(nsDependentString(args[j]));
    }
#else
    argList[j+1] = ToNewUTF8String(nsDependentString(args[j]));
#endif

- -Patrick

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBTwV7C8k25cDiHiw+AQi02QgAtViCmTjk7KqC1MmY0O01FNUH7bJMCHJ2
whAeiUXdAxo1L7Wnh3NAgyX74O8eq7Zvppe8n3R2ittaH734xV/fzB9GKIedY70v
GHGNXYIhTCxTJQudcmQxGpEorVJkcoXFNactn9OgHZCOuirgsBv6IuNSUydPqHhz
wrov0ooXfgWrjuVV2YiWt7Scv/0DJ7UqsVZ5f2qJ5eg77U3GH6ed9SVGgXqb/diG
Vpfk8lIXk9ZNHCAG9j9pUVFFwzkn0s9bxZTp0dJNAK2P2fgu0h0cexaxt3EQTX8d
jgcEMc+B3zppoOWJ4wv55CIIPkVWLv9aK0S963MSE7H0zSRPHeMWGA==
=kLlA
-----END PGP SIGNATURE-----



More information about the Enigmail mailing list