diff --git a/mozilla/extensions/sql/pgsql/src/mozSqlConnectionPgsql.cpp b/mozilla/extensions/sql/pgsql/src/mozSqlConnectionPgsql.cpp index d0804a36a5a..7474c07cefc 100644 --- a/mozilla/extensions/sql/pgsql/src/mozSqlConnectionPgsql.cpp +++ b/mozilla/extensions/sql/pgsql/src/mozSqlConnectionPgsql.cpp @@ -210,7 +210,7 @@ mozSqlConnectionPgsql::RealExec(const nsAString& aQuery, else if (stat == PGRES_COMMAND_OK) { if (!aAffectedRows) return NS_ERROR_NULL_POINTER; - sscanf(PQcmdTuples(r), "%d", aAffectedRows); + PR_sscanf(PQcmdTuples(r), "%d", aAffectedRows); mLastID = PQoidValue(r); } else { diff --git a/mozilla/extensions/sql/pgsql/src/mozSqlResultPgsql.cpp b/mozilla/extensions/sql/pgsql/src/mozSqlResultPgsql.cpp index 0b0617bca26..61168f8ac4c 100644 --- a/mozilla/extensions/sql/pgsql/src/mozSqlResultPgsql.cpp +++ b/mozilla/extensions/sql/pgsql/src/mozSqlResultPgsql.cpp @@ -1,3 +1,5 @@ + +#include "prprf.h" #include "nsReadableUtils.h" #include "mozSqlResultPgsql.h" @@ -38,7 +40,7 @@ mozSqlResultPgsql::GetColType(PRInt32 aColumnIndex) for (PRInt32 i = 0; i < PQntuples(mTypes); i++) { char* value = PQgetvalue(mTypes, i, 0); PRInt32 o; - sscanf(value, "%d", &o); + PR_sscanf(value, "%d", &o); if (o == oid) { char* type = PQgetvalue(mTypes, i, 1); if (! strcmp(type, "int2")) @@ -106,11 +108,11 @@ mozSqlResultPgsql::BuildRows() if (type == mozISqlResult::TYPE_STRING) cell->SetString(ToNewUnicode(NS_ConvertUTF8toUCS2(value))); else if (type == mozISqlResult::TYPE_INT) - sscanf(value, "%d", &cell->mInt); + PR_sscanf(value, "%d", &cell->mInt); else if (type == mozISqlResult::TYPE_FLOAT) - sscanf(value, "%f", &cell->mFloat); + PR_sscanf(value, "%f", &cell->mFloat); else if (type == mozISqlResult::TYPE_DECIMAL) - sscanf(value, "%f", &cell->mFloat); + PR_sscanf(value, "%f", &cell->mFloat); else if (type == mozISqlResult::TYPE_DATE || type == mozISqlResult::TYPE_TIME || type == mozISqlResult::TYPE_DATETIME) diff --git a/mozilla/gfx/src/nsPrintOptionsImpl.cpp b/mozilla/gfx/src/nsPrintOptionsImpl.cpp index b400cbca095..1bafcdbe901 100644 --- a/mozilla/gfx/src/nsPrintOptionsImpl.cpp +++ b/mozilla/gfx/src/nsPrintOptionsImpl.cpp @@ -52,6 +52,7 @@ #include "nsIDOMWindowInternal.h" #include "nsVoidArray.h" #include "nsSupportsArray.h" +#include "prprf.h" // For Prefs #include "nsIPrefBranch.h" @@ -1099,7 +1100,7 @@ nsresult nsPrintOptions::ReadPrefDouble(const char * aPrefId, nsresult rv = mPrefBranch->GetCharPref(aPrefId, &str); if (NS_SUCCEEDED(rv) && str) { float f; - sscanf(str, "%f", &f); + PR_sscanf(str, "%f", &f); aVal = double(f); nsMemory::Free(str); } diff --git a/mozilla/intl/locale/src/nsLocaleService.cpp b/mozilla/intl/locale/src/nsLocaleService.cpp index 3e206044e41..2f46b5d002c 100644 --- a/mozilla/intl/locale/src/nsLocaleService.cpp +++ b/mozilla/intl/locale/src/nsLocaleService.cpp @@ -44,6 +44,7 @@ #include "nsIComponentManager.h" #include "nsReadableUtils.h" #include "nsCRT.h" +#include "prprf.h" #include @@ -432,7 +433,7 @@ nsLocaleService::GetLocaleFromAcceptLanguage(const char *acceptLanguage, nsILoca qvalue[countLang] = 1.0f; /* add extra parens to get rid of warning */ if ((cPtr1 = strchr(cPtr,';')) != nsnull) { - sscanf(cPtr1,";q=%f",&qvalue[countLang]); + PR_sscanf(cPtr1,";q=%f",&qvalue[countLang]); *cPtr1 = '\0'; } if (strlen(cPtr)