infinity0 / mozilla-gnome-keyring-legacy

A firefox extension that enables Gnome Keyring integration (legacy version)
https://bugzilla.mozilla.org/show_bug.cgi?id=309807
Other
55 stars 8 forks source link

fails to build with firefox 18: ‘UINT32_MAX’ was not declared in this scope #29

Closed MeisterP closed 11 years ago

MeisterP commented 11 years ago
make -j5 -l6 VERSION=0.6.6 'XUL_CFLAGS=-I/usr/include/firefox -I/usr/include/nspr' 'XUL_LDFLAGS=-L/usr/lib64/firefox -L/usr/lib64/firefox/sdk/lib           -lxpcomglue_s -lxul -lxpcom -lmozalloc -lmozsqlite3 -lplds4 -lplc4          -lnspr4 -lpthread -ldl' XPCOM_ABI_FLAGS=-Wl,-rpath=/usr/lib64/firefox 
g++ xpcom_abi.cpp -o xpcom_abi -I/usr/include/firefox -I/usr/include/nspr -L/usr/lib64/firefox -L/usr/lib64/firefox/sdk/lib             -lxpcomglue_s -lxul -lxpcom -lmozalloc -lmozsqlite3 -lplds4 -lplc4          -lnspr4 -lpthread -ldl -Wl,-rpath=/usr/lib64/firefox -march=native -O2 -pipe -Wall -fno-rtti -fno-exceptions -fPIC -std=gnu++0x -Wl,-O1 -Wl,--as-needed  HashFunctions.cpp
In file included from /usr/include/firefox/nsStringAPI.h:20:0,
                 from xpcom_abi.cpp:5:
/usr/include/firefox/nsXPCOMStrings.h:197:27: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsXPCOMStrings.h:296:27: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsXPCOMStrings.h:327:51: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsXPCOMStrings.h:366:44: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsXPCOMStrings.h: In function ‘nsresult NS_StringAppendData(nsAString&, const PRUnichar*, uint32_t)’:
/usr/include/firefox/nsXPCOMStrings.h:368:38: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsXPCOMStrings.h: At global scope:
/usr/include/firefox/nsXPCOMStrings.h:391:44: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsXPCOMStrings.h:502:27: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsXPCOMStrings.h:601:27: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsXPCOMStrings.h:632:46: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsXPCOMStrings.h:671:44: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsXPCOMStrings.h: In function ‘nsresult NS_CStringAppendData(nsACString&, const char*, uint32_t)’:
/usr/include/firefox/nsXPCOMStrings.h:673:39: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsXPCOMStrings.h: At global scope:
/usr/include/firefox/nsXPCOMStrings.h:696:44: error: ‘UINT32_MAX’ was not declared in this scope
In file included from xpcom_abi.cpp:5:0:
/usr/include/firefox/nsStringAPI.h:79:56: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:81:50: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:110:71: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h: In member function ‘nsAString::self_type& nsAString::operator=(const char_type*)’:
/usr/include/firefox/nsStringAPI.h:123:75: error: the default argument for parameter 1 of ‘void nsAString::Assign(const char_type*, nsAString::size_type)’ has not yet been parsed
In file included from xpcom_abi.cpp:5:0:
/usr/include/firefox/nsStringAPI.h: At global scope:
/usr/include/firefox/nsStringAPI.h:425:56: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:427:55: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:456:71: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h: In member function ‘void nsACString::AssignLiteral(const char_type*)’:
/usr/include/firefox/nsStringAPI.h:466:17: error: the default argument for parameter 1 of ‘void nsACString::Assign(const char_type*, nsACString::size_type)’ has not yet been parsed
/usr/include/firefox/nsStringAPI.h: In member function ‘void nsACString::AssignASCII(const char_type*)’:
/usr/include/firefox/nsStringAPI.h:470:17: error: the default argument for parameter 1 of ‘void nsACString::Assign(const char_type*, nsACString::size_type)’ has not yet been parsed
/usr/include/firefox/nsStringAPI.h: In member function ‘nsACString::self_type& nsACString::operator=(const char_type*)’:
/usr/include/firefox/nsStringAPI.h:474:75: error: the default argument for parameter 1 of ‘void nsACString::Assign(const char_type*, nsACString::size_type)’ has not yet been parsed
/usr/include/firefox/nsStringAPI.h: At global scope:
/usr/include/firefox/nsStringAPI.h:806:56: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:826:58: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h: In member function ‘nsString_external::self_type& nsString_external::operator=(const char_type*)’:
/usr/include/firefox/nsStringAPI.h:823:76: error: the default argument for parameter 1 of ‘void nsAString::Assign(const char_type*, nsAString::size_type)’ has not yet been parsed
/usr/include/firefox/nsStringAPI.h: At global scope:
/usr/include/firefox/nsStringAPI.h:866:57: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:887:58: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h: In member function ‘nsCString_external::self_type& nsCString_external::operator=(const char_type*)’:
/usr/include/firefox/nsStringAPI.h:884:76: error: the default argument for parameter 1 of ‘void nsACString::Assign(const char_type*, nsACString::size_type)’ has not yet been parsed
/usr/include/firefox/nsStringAPI.h: At global scope:
/usr/include/firefox/nsStringAPI.h:915:65: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:919:59: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:938:66: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:942:59: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:997:64: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:1019:63: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:1041:68: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h:1063:74: error: ‘UINT32_MAX’ was not declared in this scope
/usr/include/firefox/nsStringAPI.h: In destructor ‘nsGetterCopies_external::~nsGetterCopies_external()’:
/usr/include/firefox/nsStringAPI.h:1151:24: error: the default argument for parameter 1 of ‘void nsString_external::Adopt(const char_type*, nsAString::size_type)’ has not yet been parsed
/usr/include/firefox/nsStringAPI.h: In destructor ‘nsCGetterCopies_external::~nsCGetterCopies_external()’:
/usr/include/firefox/nsStringAPI.h:1181:24: error: the default argument for parameter 1 of ‘void nsCString_external::Adopt(const char_type*, nsACString::size_type)’ has not yet been parsed
make: *** [xpcom_abi] Error 1
swick commented 11 years ago

got the same error and added

#define UINT32_MAX std::numeric_limits<uint32_t>::max ()

to nsXPCOMStrings.h and I had to change GnomeKeyring.cpp:669

nsresult rv = RemoveLogin(oldLogin);
nsresult rv2 = AddLogin(newLogin);
return (rv == NS_OK ? rv2 : rv);

but I'm not sure if this is the right thing to do or not...

infinity0 commented 11 years ago

Are you on ubuntu? If so, see issue #26 and I will close this bug.

seschwar commented 11 years ago

I also cannot compile mozilla-gnome-keyring with Firefox 18. I am on Arch Linux.

MeisterP commented 11 years ago

On 10.01.2013 22:12, Ximin Luo wrote:

Are you on ubuntu? If so, see issue #26 https://github.com/infinity0/mozilla-gnome-keyring/issues/26 and I will close this bug.

No, I use Gentoo.

seschwar commented 11 years ago

Pull request #30 fixes this for me. mozilla-gnome-keyring compiles and runs just fine again.

infinity0 commented 11 years ago

Fixed in de4d7c9