Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc4e53a1

Browse files
committed
Fixes for:
Here are a few minor fixes to Postgres95. Mostly I have added constto some of the char pointers. There was also a missing header fileand a place where it looks like "==" was used when "=" was meant.I also changed some variables from Pfin and Pfout tp pfin and pfoutbecause the latter shadow global variables and that just seems likean unsafe practice which I like to avoid.Submitted by: "D'Arcy J.M. Cain" <darcy@druid.druid.com>
1 parentfd3b829 commitc4e53a1

File tree

6 files changed

+90
-89
lines changed

6 files changed

+90
-89
lines changed

‎src/interfaces/libpq/fe-auth.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.3 1996/07/27 02:27:55 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.4 1996/08/06 16:16:42 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -162,16 +162,16 @@ pg_krb4_authname(char* PQerrormsg)
162162
* (canonicalized to omit all domain suffixes).
163163
*/
164164
staticint
165-
pg_krb4_sendauth(char*PQerrormsg,intsock,
165+
pg_krb4_sendauth(constchar*PQerrormsg,intsock,
166166
structsockaddr_in*laddr,
167167
structsockaddr_in*raddr,
168-
char*hostname)
168+
constchar*hostname)
169169
{
170170
longkrbopts=0;/* one-way authentication */
171171
KTEXT_STclttkt;
172172
intstatus;
173173
charhostbuf[MAXHOSTNAMELEN];
174-
char*realm=getenv("PGREALM");/* NULL == current realm */
174+
constchar*realm=getenv("PGREALM");/* NULL == current realm */
175175

176176
if (!hostname|| !(*hostname)) {
177177
if (gethostname(hostbuf,MAXHOSTNAMELEN)<0)
@@ -227,7 +227,7 @@ pg_krb4_sendauth(char* PQerrormsg, int sock,
227227
* and we can't afford to punt.
228228
*/
229229
staticchar*
230-
pg_an_to_ln(char*aname)
230+
pg_an_to_ln(constchar*aname)
231231
{
232232
char*p;
233233

@@ -246,7 +246,7 @@ pg_an_to_ln(char *aname)
246246
*
247247
*/
248248
staticint
249-
krb5_ccachepg_krb5_init()
249+
krb5_ccachepg_krb5_init(void)
250250
{
251251
krb5_error_codecode;
252252
char*realm,*defname;
@@ -287,8 +287,8 @@ krb5_ccache pg_krb5_init()
287287
*
288288
* We obtain this information by digging around in the ticket file.
289289
*/
290-
staticchar*
291-
pg_krb5_authname(char*PQerrormsg)
290+
staticconstchar*
291+
pg_krb5_authname(constchar*PQerrormsg)
292292
{
293293
krb5_ccacheccache;
294294
krb5_principalprincipal;
@@ -335,15 +335,15 @@ pg_krb5_authname(char* PQerrormsg)
335335
* in the PGREALM (or local) database. This is probably a bad assumption.
336336
*/
337337
staticint
338-
pg_krb5_sendauth(char*PQerrormsg,intsock,
338+
pg_krb5_sendauth(constchar*PQerrormsg,intsock,
339339
structsockaddr_in*laddr,
340340
structsockaddr_in*raddr,
341-
char*hostname)
341+
constchar*hostname)
342342
{
343343
charservbuf[MAXHOSTNAMELEN+1+
344344
sizeof(PG_KRB_SRVNAM)];
345-
char*hostp;
346-
char*realm;
345+
constchar*hostp;
346+
constchar*realm;
347347
krb5_error_codecode;
348348
krb5_principalclient,server;
349349
krb5_ccacheccache;
@@ -430,7 +430,7 @@ pg_krb5_sendauth(char* PQerrormsg,int sock,
430430
* fe_sendauth -- client demux routine for outgoing authentication information
431431
*/
432432
int
433-
fe_sendauth(MsgTypemsgtype,Port*port,char*hostname,char*PQerrormsg)
433+
fe_sendauth(MsgTypemsgtype,Port*port,constchar*hostname,constchar*PQerrormsg)
434434
{
435435
switch (msgtype) {
436436
#ifdefKRB4
@@ -474,7 +474,7 @@ fe_sendauth(MsgType msgtype, Port *port, char *hostname, char* PQerrormsg)
474474
staticpg_authsvc=-1;
475475

476476
void
477-
fe_setauthsvc(char*name,char*PQerrormsg)
477+
fe_setauthsvc(constchar*name,char*PQerrormsg)
478478
{
479479
inti;
480480

‎src/interfaces/libpq/fe-auth.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: fe-auth.h,v 1.1.1.1 1996/07/09 06:22:17 scrappy Exp $
9+
* $Id: fe-auth.h,v 1.2 1996/08/06 16:16:44 scrappy Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -28,8 +28,8 @@
2828
#defineDEFAULT_CLIENT_AUTHSVC"kerberos"
2929
#endif/* KRB4 || KRB5 */
3030

31-
externintfe_sendauth(MsgTypemsgtype,Port*port,char*hostname,char*PQerromsg);
32-
externvoidfe_setauthsvc(char*name,char*PQerrormsg);
31+
externintfe_sendauth(MsgTypemsgtype,Port*port,constchar*hostname,constchar*PQerromsg);
32+
externvoidfe_setauthsvc(constchar*name,char*PQerrormsg);
3333

3434
#definePG_KRB4_VERSION"PGVER4.1"/* at most KRB_SENDAUTH_VLEN chars */
3535
#definePG_KRB5_VERSION"PGVER5.1"

‎src/interfaces/libpq/fe-connect.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.4 1996/07/23 03:35:12 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.5 1996/08/06 16:16:45 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -31,7 +31,7 @@
3131
standard function? (My, my. Touchy today, are we?) */
3232
static
3333
char*
34-
strdup(char*string)
34+
strdup(constchar*string)
3535
{
3636
char*nstr;
3737

@@ -64,10 +64,10 @@ static void closePGconn(PGconn *conn);
6464
* ----------------
6565
*/
6666
PGconn*
67-
PQsetdb(char*pghost,char*pgport,char*pgoptions,char*pgtty,char*dbName)
67+
PQsetdb(constchar*pghost,constchar*pgport,constchar*pgoptions,constchar*pgtty,constchar*dbName)
6868
{
6969
PGconn*conn;
70-
char*tmp;
70+
constchar*tmp;
7171

7272
conn= (PGconn*)malloc(sizeof(PGconn));
7373

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp