From 60d3c9fdf4331b4e50d4c8ece07bb8bc0dad7385 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 4 Mar 2006 21:32:47 +0000 Subject: [PATCH] Declare the arguments of AllocateFile() as const char *, not char *. This is consistent with the standard definition of fopen(). --- src/backend/storage/file/fd.c | 4 ++-- src/include/storage/fd.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 496fc48163..edce16471e 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.125 2006/01/17 23:52:31 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.126 2006/03/04 21:32:47 tgl Exp $ * * NOTES: * @@ -1236,7 +1236,7 @@ FileTruncate(File file, long offset) * Ideally this should be the *only* direct call of fopen() in the backend. */ FILE * -AllocateFile(char *name, char *mode) +AllocateFile(const char *name, const char *mode) { FILE *file; diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h index 5b1ebe743b..41c81e23c7 100644 --- a/src/include/storage/fd.h +++ b/src/include/storage/fd.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/fd.h,v 1.54 2005/10/15 02:49:46 momjian Exp $ + * $PostgreSQL: pgsql/src/include/storage/fd.h,v 1.55 2006/03/04 21:32:46 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -71,7 +71,7 @@ extern long FileSeek(File file, long offset, int whence); extern int FileTruncate(File file, long offset); /* Operations that allow use of regular stdio --- USE WITH CAUTION */ -extern FILE *AllocateFile(char *name, char *mode); +extern FILE *AllocateFile(const char *name, const char *mode); extern int FreeFile(FILE *file); /* Operations to allow use of the library routines */ -- 2.11.0