andre@0: /* This Source Code Form is subject to the terms of the Mozilla Public andre@0: * License, v. 2.0. If a copy of the MPL was not distributed with this andre@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ andre@0: #include "prerror.h" andre@0: #include "secerr.h" andre@0: #include "secport.h" andre@0: #include "prinit.h" andre@0: #include "prprf.h" andre@0: #include "prtypes.h" andre@0: #include "prlog.h" andre@0: #include "plstr.h" andre@0: #include "nssutil.h" andre@0: #include andre@0: andre@0: #define ER3(name, value, str) {#name, str}, andre@0: andre@0: static const struct PRErrorMessage sectext[] = { andre@0: #include "SECerrs.h" andre@0: {0,0} andre@0: }; andre@0: andre@0: static const struct PRErrorTable sec_et = { andre@0: sectext, "secerrstrings", SEC_ERROR_BASE, andre@0: (sizeof sectext)/(sizeof sectext[0]) andre@0: }; andre@0: andre@0: static PRStatus andre@0: nss_InitializePRErrorTableOnce(void) { andre@0: return PR_ErrorInstallTable(&sec_et); andre@0: } andre@0: andre@0: static PRCallOnceType once; andre@0: andre@0: SECStatus andre@0: NSS_InitializePRErrorTable(void) andre@0: { andre@0: return (PR_SUCCESS == PR_CallOnce(&once, nss_InitializePRErrorTableOnce)) andre@0: ? SECSuccess : SECFailure; andre@0: } andre@0: