Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
022903f2
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
022903f2
编写于
8月 18, 1997
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reduce open() calls. Replace fopen() calls with calls to fd.c functions.
上级
eaae21fb
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
74 addition
and
106 deletion
+74
-106
src/backend/commands/copy.c
src/backend/commands/copy.c
+6
-4
src/backend/libpq/hba.c
src/backend/libpq/hba.c
+8
-8
src/backend/libpq/password.c
src/backend/libpq/password.c
+3
-2
src/backend/optimizer/geqo/geqo_params.c
src/backend/optimizer/geqo/geqo_params.c
+5
-3
src/backend/parser/dbcommands.c
src/backend/parser/dbcommands.c
+4
-3
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/bufmgr.c
+3
-3
src/backend/storage/file/fd.c
src/backend/storage/file/fd.c
+26
-50
src/backend/tcop/utility.c
src/backend/tcop/utility.c
+4
-6
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/arrayfuncs.c
+4
-3
src/backend/utils/sort/psort.c
src/backend/utils/sort/psort.c
+7
-15
src/include/storage/fd.h
src/include/storage/fd.h
+4
-9
未找到文件。
src/backend/commands/copy.c
浏览文件 @
022903f2
...
...
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.2
4 1997/06/12 15:39:44 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.2
5 1997/08/18 02:14:34 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -34,6 +34,7 @@
#include <catalog/catname.h>
#include <catalog/pg_user.h>
#include <commands/copy.h>
#include <storage/fd.h>
#define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
#define VALUE(c) ((c) - '0')
...
...
@@ -127,7 +128,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
fp
=
Pfin
;
}
else
fp
=
stdin
;
}
else
{
fp
=
fopen
(
filename
,
"r"
);
fp
=
AllocateFile
(
filename
,
"r"
);
if
(
fp
==
NULL
)
elog
(
WARN
,
"COPY command, running in backend with "
"effective uid %d, could not open file '%s' for "
...
...
@@ -145,7 +146,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
}
else
{
mode_t
oumask
;
/* Pre-existing umask value */
oumask
=
umask
((
mode_t
)
0
);
fp
=
fopen
(
filename
,
"w"
);
fp
=
AllocateFile
(
filename
,
"w"
);
umask
(
oumask
);
if
(
fp
==
NULL
)
elog
(
WARN
,
"COPY command, running in backend with "
...
...
@@ -156,7 +157,8 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
}
CopyTo
(
rel
,
binary
,
oids
,
fp
,
delim
);
}
if
(
!
pipe
)
fclose
(
fp
);
if
(
!
pipe
)
FreeFile
(
fp
);
else
if
(
!
from
&&
!
binary
)
{
fputs
(
"
\\
.
\n
"
,
fp
);
if
(
IsUnderPostmaster
)
fflush
(
Pfout
);
...
...
src/backend/libpq/hba.c
浏览文件 @
022903f2
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.1
7 1997/08/12 22:52:52
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.1
8 1997/08/18 02:14:37
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -28,7 +28,7 @@
#include <libpq/pqcomm.h>
#include <libpq/hba.h>
#include <port/inet_aton.h>
/* For inet_aton() */
#include <storage/fd.h>
/* Some standard C libraries, including GNU, have an isblank() function.
Others, including Solaris, do not. So we have our own.
...
...
@@ -334,8 +334,8 @@ find_hba_entry(const char DataDir[], const struct in_addr ip_addr,
strlen
(
CONF_FILE
)
+
2
)
*
sizeof
(
char
));
sprintf
(
conf_file
,
"%s/%s"
,
DataDir
,
CONF_FILE
);
file
=
fopen
(
conf_file
,
"r"
);
if
(
file
==
0
)
{
file
=
AllocateFile
(
conf_file
,
"r"
);
if
(
file
==
NULL
)
{
/* The open of the config file failed. */
*
host_ok_p
=
false
;
...
...
@@ -350,7 +350,7 @@ find_hba_entry(const char DataDir[], const struct in_addr ip_addr,
}
else
{
process_open_config_file
(
file
,
ip_addr
,
database
,
host_ok_p
,
userauth_p
,
usermap_name
,
find_password_entries
);
fclos
e
(
file
);
FreeFil
e
(
file
);
}
free
(
conf_file
);
}
...
...
@@ -636,8 +636,8 @@ verify_against_usermap(const char DataDir[],
strlen
(
MAP_FILE
)
+
2
)
*
sizeof
(
char
));
sprintf
(
map_file
,
"%s/%s"
,
DataDir
,
MAP_FILE
);
file
=
fopen
(
map_file
,
"r"
);
if
(
file
==
0
)
{
file
=
AllocateFile
(
map_file
,
"r"
);
if
(
file
==
NULL
)
{
/* The open of the map file failed. */
*
checks_out_p
=
false
;
...
...
@@ -654,7 +654,7 @@ verify_against_usermap(const char DataDir[],
verify_against_open_usermap
(
file
,
pguser
,
ident_username
,
usermap_name
,
checks_out_p
);
fclos
e
(
file
);
FreeFil
e
(
file
);
}
free
(
map_file
);
...
...
src/backend/libpq/password.c
浏览文件 @
022903f2
...
...
@@ -2,6 +2,7 @@
#include <libpq/password.h>
#include <libpq/hba.h>
#include <libpq/libpq.h>
#include <storage/fd.h>
#include <string.h>
#include <unistd.h>
#ifdef HAVE_CRYPT_H
...
...
@@ -56,7 +57,7 @@ verify_password(char *user, char *password, Port *port,
strcat
(
pw_file_fullname
,
"/"
);
strcat
(
pw_file_fullname
,
pw_file_name
);
pw_file
=
fopen
(
pw_file_fullname
,
"r"
);
pw_file
=
AllocateFile
(
pw_file_fullname
,
"r"
);
if
(
!
pw_file
)
{
sprintf
(
PQerrormsg
,
"verify_password: couldn't open password file '%s'
\n
"
,
...
...
@@ -84,7 +85,7 @@ verify_password(char *user, char *password, Port *port,
if
(
strcmp
(
user
,
test_user
)
==
0
)
{
/* we're outta here one way or the other. */
fclos
e
(
pw_file
);
FreeFil
e
(
pw_file
);
if
(
strcmp
(
crypt
(
password
,
salt
),
test_pw
)
==
0
)
{
/* it matched. */
...
...
src/backend/optimizer/geqo/geqo_params.c
浏览文件 @
022903f2
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geqo_params.c,v 1.
4 1997/08/12 22:53:09
momjian Exp $
* $Id: geqo_params.c,v 1.
5 1997/08/18 02:14:41
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -43,6 +43,8 @@
#include "optimizer/geqo_gene.h"
#include "optimizer/geqo.h"
#include "storage/fd.h"
#define POOL_TAG "Pool_Size"
#define TRIAL_TAG "Generations"
#define RAND_TAG "Random_Seed"
...
...
@@ -89,7 +91,7 @@ geqo_params(int string_length)
sprintf
(
conf_file
,
"%s/%s"
,
DataDir
,
GEQO_FILE
);
/* open the config file */
file
=
fopen
(
conf_file
,
"r"
);
file
=
AllocateFile
(
conf_file
,
"r"
);
if
(
file
)
{
/*
...
...
@@ -187,7 +189,7 @@ geqo_params(int string_length)
}
}
fclos
e
(
file
);
FreeFil
e
(
file
);
pfree
(
conf_file
);
}
...
...
src/backend/parser/dbcommands.c
浏览文件 @
022903f2
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/dbcommands.c,v 1.
3 1997/01/10 20:18:20
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/dbcommands.c,v 1.
4 1997/08/18 02:14:44
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -31,6 +31,7 @@
#include "tcop/tcopprot.h"
#include "storage/bufmgr.h"
#include "storage/lmgr.h"
#include "storage/fd.h"
/* non-export function prototypes */
...
...
@@ -249,9 +250,9 @@ stop_vacuum(char *dbname)
sprintf
(
filename
,
"%s%cbase%c%s%c%s.vacuum"
,
DataDir
,
SEP_CHAR
,
SEP_CHAR
,
dbname
,
SEP_CHAR
,
dbname
);
if
((
fp
=
fopen
(
filename
,
"r"
))
!=
(
FILE
*
)
NULL
)
{
if
((
fp
=
AllocateFile
(
filename
,
"r"
))
!=
NULL
)
{
fscanf
(
fp
,
"%d"
,
&
pid
);
fclos
e
(
fp
);
FreeFil
e
(
fp
);
if
(
kill
(
pid
,
SIGKILLDAEMON1
)
<
0
)
{
elog
(
WARN
,
"can't kill vacuum daemon (pid %d) on %s"
,
pid
,
dbname
);
...
...
src/backend/storage/buffer/bufmgr.c
浏览文件 @
022903f2
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.1
6 1997/08/12 22:53:46
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.1
7 1997/08/18 02:14:49
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1663,7 +1663,7 @@ _bm_die(Oid dbId, Oid relId, int blkNo, int bufNo,
tb
=
&
TraceBuf
[
cur
];
if
((
fp
=
fopen
(
"/tmp/death_notice"
,
"w"
))
==
(
FILE
*
)
NULL
)
if
((
fp
=
AllocateFile
(
"/tmp/death_notice"
,
"w"
))
==
NULL
)
elog
(
FATAL
,
"buffer alloc trace error and can't open log file"
);
fprintf
(
fp
,
"buffer alloc trace detected the following error:
\n\n
"
);
...
...
@@ -1728,7 +1728,7 @@ _bm_die(Oid dbId, Oid relId, int blkNo, int bufNo,
break
;
}
fclos
e
(
fp
);
FreeFil
e
(
fp
);
kill
(
getpid
(),
SIGILL
);
}
...
...
src/backend/storage/file/fd.c
浏览文件 @
022903f2
...
...
@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Id: fd.c,v 1.2
0 1997/08/12 22:53:51
momjian Exp $
* $Id: fd.c,v 1.2
1 1997/08/18 02:14:50
momjian Exp $
*
* NOTES:
*
...
...
@@ -124,12 +124,6 @@ static Size SizeVfdCache = 0;
*/
static
int
nfile
=
0
;
/*
* we use the name of the null device in various places, mostly so
* that we can open it and find out if we really have any descriptors
* available or not.
*/
static
char
*
Nulldev
=
"/dev/null"
;
static
char
Sep_char
=
'/'
;
/*
...
...
@@ -312,7 +306,6 @@ LruInsert (File file)
vfdP
=
&
VfdCache
[
file
];
if
(
FileIsNotOpen
(
file
))
{
int
tmpfd
;
if
(
nfile
>=
pg_nofile
()
)
AssertLruRoom
();
...
...
@@ -324,16 +317,13 @@ LruInsert (File file)
* should be able to open all the time. If this fails, we
* assume this is because there's no free file descriptors.
*/
tryAgain:
tmpfd
=
open
(
Nulldev
,
O_CREAT
|
O_RDWR
,
0666
);
if
(
tmpfd
<
0
)
{
tryAgain:
vfdP
->
fd
=
open
(
vfdP
->
fileName
,
vfdP
->
fileFlags
,
vfdP
->
fileMode
);
if
(
vfdP
->
fd
<
0
&&
(
errno
==
EMFILE
||
errno
==
ENFILE
)
)
{
errno
=
0
;
AssertLruRoom
();
goto
tryAgain
;
}
else
{
close
(
tmpfd
);
}
vfdP
->
fd
=
open
(
vfdP
->
fileName
,
vfdP
->
fileFlags
,
vfdP
->
fileMode
);
if
(
vfdP
->
fd
<
0
)
{
DO_DB
(
elog
(
DEBUG
,
"RE_OPEN FAILED: %d"
,
...
...
@@ -530,7 +520,6 @@ fileNameOpenFile(FileName fileName,
{
File
file
;
Vfd
*
vfdP
;
int
tmpfd
;
DO_DB
(
elog
(
DEBUG
,
"fileNameOpenFile: %s %x %o"
,
fileName
,
fileFlags
,
fileMode
));
...
...
@@ -542,18 +531,15 @@ fileNameOpenFile(FileName fileName,
AssertLruRoom
();
tryAgain:
tmpfd
=
open
(
Nulldev
,
O_CREAT
|
O_RDWR
,
0666
);
if
(
tmpfd
<
0
)
{
vfdP
->
fd
=
open
(
fileName
,
fileFlags
,
fileMode
);
if
(
vfdP
->
fd
<
0
&&
(
errno
==
EMFILE
||
errno
==
ENFILE
)
)
{
DO_DB
(
elog
(
DEBUG
,
"fileNameOpenFile: not enough descs, retry, er= %d"
,
errno
));
errno
=
0
;
AssertLruRoom
();
goto
tryAgain
;
}
else
{
close
(
tmpfd
);
}
vfdP
->
fd
=
open
(
fileName
,
fileFlags
,
fileMode
);
vfdP
->
fdstate
=
0x0
;
if
(
vfdP
->
fd
<
0
)
{
...
...
@@ -816,30 +802,31 @@ FileNameUnlink(char *filename)
*/
static
int
allocatedFiles
=
0
;
void
AllocateFile
()
FILE
*
AllocateFile
(
char
*
name
,
char
*
mode
)
{
int
fd
;
FILE
*
file
;
int
fdleft
;
DO_DB
(
elog
(
DEBUG
,
"AllocateFile: Allocated %d."
,
allocatedFiles
));
while
((
fd
=
open
(
Nulldev
,
O_WRONLY
,
0
))
<
0
)
{
if
(
errno
==
EMFILE
)
{
errno
=
0
;
AssertLruRoom
();
}
else
{
elog
(
WARN
,
"Open: %s in %s line %d, %s"
,
Nulldev
,
__FILE__
,
__LINE__
,
strerror
(
errno
));
}
TryAgain:
if
((
file
=
fopen
(
name
,
mode
))
==
NULL
)
{
if
(
errno
==
EMFILE
||
errno
==
ENFILE
)
{
DO_DB
(
elog
(
DEBUG
,
"AllocateFile: not enough descs, retry, er= %d"
,
errno
));
errno
=
0
;
AssertLruRoom
();
goto
TryAgain
;
}
}
close
(
fd
);
++
allocatedFiles
;
fdleft
=
pg_nofile
()
-
allocatedFiles
;
if
(
fdleft
<
6
)
{
elog
(
NOTICE
,
"warning: few usable file descriptors left (%d)"
,
fdleft
);
else
{
++
allocatedFiles
;
fdleft
=
pg_nofile
()
-
allocatedFiles
;
if
(
fdleft
<
6
)
elog
(
NOTICE
,
"warning: few usable file descriptors left (%d)"
,
fdleft
);
}
return
file
;
}
/*
...
...
@@ -847,11 +834,12 @@ AllocateFile()
* AllocateFile()?
*/
void
FreeFile
()
FreeFile
(
FILE
*
file
)
{
DO_DB
(
elog
(
DEBUG
,
"FreeFile: Allocated %d."
,
allocatedFiles
));
Assert
(
allocatedFiles
>
0
);
fclose
(
file
);
--
allocatedFiles
;
}
...
...
@@ -865,15 +853,3 @@ closeAllVfds()
LruDelete
(
i
);
}
}
void
closeOneVfd
()
{
int
tmpfd
;
tmpfd
=
open
(
Nulldev
,
O_CREAT
|
O_RDWR
,
0666
);
if
(
tmpfd
<
0
)
AssertLruRoom
();
else
close
(
tmpfd
);
}
src/backend/tcop/utility.c
浏览文件 @
022903f2
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.1
8 1997/07/24 20:15:18
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.1
9 1997/08/18 02:14:52
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -47,6 +47,7 @@
#include "tcop/variable.h"
#include "tcop/utility.h"
#include "fmgr.h"
/* For load_file() */
#include "storage/fd.h"
#ifndef NO_SECURITY
#include "miscadmin.h"
...
...
@@ -218,9 +219,6 @@ ProcessUtility(Node *parsetree,
commandTag
=
"COPY"
;
CHECK_IF_ABORTED
();
/* Free up file descriptors - going to do a read... */
closeOneVfd
();
DoCopy
(
stmt
->
relname
,
stmt
->
binary
,
stmt
->
oids
,
...
...
@@ -594,9 +592,9 @@ ProcessUtility(Node *parsetree,
filename
=
stmt
->
filename
;
closeAllVfds
();
if
((
fp
=
fopen
(
filename
,
"r"
))
==
NULL
)
if
((
fp
=
AllocateFile
(
filename
,
"r"
))
==
NULL
)
elog
(
WARN
,
"LOAD: could not open file %s"
,
filename
);
fclos
e
(
fp
);
FreeFil
e
(
fp
);
load_file
(
filename
);
}
break
;
...
...
src/backend/utils/adt/arrayfuncs.c
浏览文件 @
022903f2
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.1
3 1997/08/12 22:54:2
4 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.1
4 1997/08/18 02:14:5
4 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -23,7 +23,7 @@
#include "utils/syscache.h"
#include "utils/memutils.h"
#include "storage/fd.h"
/* for SEEK_ */
#include "storage/fd.h"
#include "fmgr.h"
#include "utils/array.h"
...
...
@@ -463,11 +463,12 @@ _ReadLOArray(char *str,
if
(
accessfile
)
{
FILE
*
afd
;
if
((
afd
=
fopen
(
accessfile
,
"r"
))
==
NULL
)
if
((
afd
=
AllocateFile
(
accessfile
,
"r"
))
==
NULL
)
elog
(
WARN
,
"unable to open access pattern file"
);
*
chunkFlag
=
true
;
retStr
=
_ChunkArray
(
*
fd
,
afd
,
ndim
,
dim
,
baseSize
,
nbytes
,
chunkfile
);
FreeFile
(
afd
);
}
return
(
retStr
);
}
...
...
src/backend/utils/sort/psort.c
浏览文件 @
022903f2
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.1
5 1997/08/14 16:11:28
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.1
6 1997/08/18 02:14:56
momjian Exp $
*
* NOTES
* Sorts the first relation into the second relation.
...
...
@@ -763,16 +763,10 @@ gettape()
memmove
(
tp
->
tl_name
,
uniqueName
,
strlen
(
uniqueName
));
AllocateFile
();
file
=
fopen
(
tp
->
tl_name
,
"w+"
);
if
(
file
==
NULL
)
{
elog
(
NOTICE
,
"psort: gettape: fopen returned error code %i"
,
errno
);
/* XXX this should not happen */
FreeFile
();
FREE
(
tp
->
tl_name
);
FREE
(
tp
);
return
(
NULL
);
}
file
=
AllocateFile
(
tp
->
tl_name
,
"w+"
);
if
(
file
==
NULL
)
elog
(
WARN
,
"Open: %s in %s line %d, %s"
,
tp
->
tl_name
,
__FILE__
,
__LINE__
,
strerror
(
errno
));
tp
->
tl_fd
=
fileno
(
file
);
tp
->
tl_next
=
Tapes
;
...
...
@@ -823,8 +817,7 @@ destroytape(FILE *file)
if
((
fd
=
fileno
(
file
))
==
tp
->
tl_fd
)
{
Tapes
=
tp
->
tl_next
;
fclose
(
file
);
FreeFile
();
FreeFile
(
file
);
unlink
(
tp
->
tl_name
);
FREE
(
tp
->
tl_name
);
FREE
(
tp
);
...
...
@@ -833,8 +826,7 @@ destroytape(FILE *file)
if
(
tp
->
tl_next
==
NULL
)
elog
(
FATAL
,
"destroytape: tape not found"
);
if
(
tp
->
tl_next
->
tl_fd
==
fd
)
{
fclose
(
file
);
FreeFile
();
FreeFile
(
file
);
tq
=
tp
->
tl_next
;
tp
->
tl_next
=
tq
->
tl_next
;
unlink
(
tq
->
tl_name
);
...
...
src/include/storage/fd.h
浏览文件 @
022903f2
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: fd.h,v 1.
6 1997/02/14 04:18:42
momjian Exp $
* $Id: fd.h,v 1.
7 1997/08/18 02:15:04
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -34,11 +34,7 @@
#ifndef FD_H
#define FD_H
/*
* FileOpen uses the standard UNIX open(2) flags.
*/
#ifndef O_RDONLY
#endif
/* O_RDONLY */
#include <stdio.h>
/*
* FileSeek uses the standard UNIX lseek(2) flags.
...
...
@@ -76,10 +72,9 @@ extern long FileTell(File file);
extern
int
FileTruncate
(
File
file
,
int
offset
);
extern
int
FileSync
(
File
file
);
extern
int
FileNameUnlink
(
char
*
filename
);
extern
void
AllocateFile
(
void
);
extern
void
FreeFile
(
void
);
extern
FILE
*
AllocateFile
(
char
*
name
,
char
*
mode
);
extern
void
FreeFile
(
FILE
*
);
extern
void
closeAllVfds
(
void
);
extern
void
closeOneVfd
(
void
);
extern
int
pg_fsync
(
int
fd
);
#endif
/* FD_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录