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

Commit60d3c9f

Browse files
committed
Declare the arguments of AllocateFile() as const char *, not char *.
This is consistent with the standard definition of fopen().
1 parent2689abf commit60d3c9f

File tree

2 files changed

+4
-4
lines changed
  • src
    • backend/storage/file
    • include/storage

2 files changed

+4
-4
lines changed

‎src/backend/storage/file/fd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.125 2006/01/17 23:52:31 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.126 2006/03/04 21:32:47 tgl Exp $
1111
*
1212
* NOTES:
1313
*
@@ -1236,7 +1236,7 @@ FileTruncate(File file, long offset)
12361236
* Ideally this should be the *only* direct call of fopen() in the backend.
12371237
*/
12381238
FILE*
1239-
AllocateFile(char*name,char*mode)
1239+
AllocateFile(constchar*name,constchar*mode)
12401240
{
12411241
FILE*file;
12421242

‎src/include/storage/fd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/storage/fd.h,v 1.54 2005/10/15 02:49:46momjian Exp $
10+
* $PostgreSQL: pgsql/src/include/storage/fd.h,v 1.55 2006/03/04 21:32:46tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -71,7 +71,7 @@ extern long FileSeek(File file, long offset, int whence);
7171
externintFileTruncate(Filefile,longoffset);
7272

7373
/* Operations that allow use of regular stdio --- USE WITH CAUTION */
74-
externFILE*AllocateFile(char*name,char*mode);
74+
externFILE*AllocateFile(constchar*name,constchar*mode);
7575
externintFreeFile(FILE*file);
7676

7777
/* Operations to allow use of the <dirent.h> library routines */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp