mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-05 19:09:58 +08:00
Awhile back we replaced all uses of strcasecmp and strncasecmp with
pg_strcasecmp and pg_strncasecmp ... but I see some of the former have crept back in. Eternal vigilance is the price of locale independence, apparently.
This commit is contained in:
parent
cb504a41b2
commit
4a2972d691
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.126 2005/06/27 02:04:24 neilc Exp $
|
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.127 2005/07/25 04:52:31 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -234,7 +234,7 @@ pg_krb5_recvauth(Port *port)
|
|||||||
|
|
||||||
kusername = pg_an_to_ln(kusername);
|
kusername = pg_an_to_ln(kusername);
|
||||||
if (pg_krb_caseins_users)
|
if (pg_krb_caseins_users)
|
||||||
ret = strncasecmp(port->user_name, kusername, SM_DATABASE_USER);
|
ret = pg_strncasecmp(port->user_name, kusername, SM_DATABASE_USER);
|
||||||
else
|
else
|
||||||
ret = strncmp(port->user_name, kusername, SM_DATABASE_USER);
|
ret = strncmp(port->user_name, kusername, SM_DATABASE_USER);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
* Portions taken from FreeBSD.
|
* Portions taken from FreeBSD.
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.92 2005/07/10 16:13:12 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.93 2005/07/25 04:52:31 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -829,7 +829,7 @@ check_encodings_match(int pg_enc, const char *ctype)
|
|||||||
for (i = 0; encoding_match_list[i].system_enc_name; i++)
|
for (i = 0; encoding_match_list[i].system_enc_name; i++)
|
||||||
{
|
{
|
||||||
if (pg_enc == encoding_match_list[i].pg_enc_code
|
if (pg_enc == encoding_match_list[i].pg_enc_code
|
||||||
&& strcasecmp(sys, encoding_match_list[i].system_enc_name) == 0)
|
&& pg_strcasecmp(sys, encoding_match_list[i].system_enc_name) == 0)
|
||||||
{
|
{
|
||||||
free(sys);
|
free(sys);
|
||||||
return;
|
return;
|
||||||
@ -860,7 +860,7 @@ find_matching_encoding(const char *ctype)
|
|||||||
|
|
||||||
for (i = 0; encoding_match_list[i].system_enc_name; i++)
|
for (i = 0; encoding_match_list[i].system_enc_name; i++)
|
||||||
{
|
{
|
||||||
if (strcasecmp(sys, encoding_match_list[i].system_enc_name) == 0)
|
if (pg_strcasecmp(sys, encoding_match_list[i].system_enc_name) == 0)
|
||||||
{
|
{
|
||||||
free(sys);
|
free(sys);
|
||||||
return encoding_match_list[i].pg_enc_code;
|
return encoding_match_list[i].pg_enc_code;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.59 2005/07/10 16:13:13 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.60 2005/07/25 04:52:32 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -911,7 +911,7 @@ pgwin32_CommandLine(bool registration)
|
|||||||
|
|
||||||
if (registration)
|
if (registration)
|
||||||
{
|
{
|
||||||
if (strcasecmp(cmdLine + strlen(cmdLine) - 4, ".exe"))
|
if (pg_strcasecmp(cmdLine + strlen(cmdLine) - 4, ".exe"))
|
||||||
{
|
{
|
||||||
/* If commandline does not end in .exe, append it */
|
/* If commandline does not end in .exe, append it */
|
||||||
strcat(cmdLine, ".exe");
|
strcat(cmdLine, ".exe");
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.64 2005/07/18 19:12:09 tgl Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.65 2005/07/25 04:52:32 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -828,8 +828,8 @@ makeAlterConfigCommand(const char *arrayitem, const char *type, const char *name
|
|||||||
* Some GUC variable names are 'LIST' type and hence must not be
|
* Some GUC variable names are 'LIST' type and hence must not be
|
||||||
* quoted.
|
* quoted.
|
||||||
*/
|
*/
|
||||||
if (strcasecmp(mine, "DateStyle") == 0
|
if (pg_strcasecmp(mine, "DateStyle") == 0
|
||||||
|| strcasecmp(mine, "search_path") == 0)
|
|| pg_strcasecmp(mine, "search_path") == 0)
|
||||||
appendPQExpBuffer(buf, "%s", pos + 1);
|
appendPQExpBuffer(buf, "%s", pos + 1);
|
||||||
else
|
else
|
||||||
appendStringLiteral(buf, pos + 1, false);
|
appendStringLiteral(buf, pos + 1, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user