Content-Length: 321328 | pFad | http://github.com/postgrespro/postgres/commit/60d3c9fdf4331b4e50d4c8ece07bb8bc0dad7385

34 Declare the arguments of AllocateFile() as const char *, not char *. · postgrespro/postgres@60d3c9f · GitHub
Skip to content

Commit 60d3c9f

Browse files
committed
Declare the arguments of AllocateFile() as const char *, not char *.
This is consistent with the standard definition of fopen().
1 parent 2689abf commit 60d3c9f

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(const char *name, const char *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:46 momjian Exp $
10+
* $PostgreSQL: pgsql/src/include/storage/fd.h,v 1.55 2006/03/04 21:32:46 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -71,7 +71,7 @@ extern long FileSeek(File file, long offset, int whence);
7171
extern int FileTruncate(File file, long offset);
7272

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

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

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/60d3c9fdf4331b4e50d4c8ece07bb8bc0dad7385

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy