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

Commitec6feaa

Browse files
committed
Under Win32, stat() returns an st_ino field, but it has no meaning (on
Win2K, and possibly all Win32 variants, it is always 0). This causes anumber of problems in the dfmgr.c logic, which basically all revolvearound the fact that *any* two files will appear to have the same inode.Claudio Natoli
1 parent51b363e commitec6feaa

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎src/backend/utils/fmgr/dfmgr.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.69 2004/01/19 02:06:41 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.70 2004/02/17 03:35:57 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -30,7 +30,9 @@ typedef struct df_files
3030
{
3131
structdf_files*next;/* List link */
3232
dev_tdevice;/* Device file is on */
33+
#ifndefWIN32/* ensures we never again depend on this under win32 */
3334
ino_tinode;/* Inode number of file */
35+
#endif
3436
void*handle;/* a handle for pg_dl* functions */
3537
charfilename[1];/* Full pathname of file */
3638

@@ -43,7 +45,12 @@ typedef struct df_files
4345
staticDynamicFileList*file_list=NULL;
4446
staticDynamicFileList*file_tail=NULL;
4547

48+
/* stat() call under Win32 returns an st_ino field, but it has no meaning */
49+
#ifndefWIN32
4650
#defineSAME_INODE(A,B) ((A).st_ino == (B).inode && (A).st_dev == (B).device)
51+
#else
52+
#defineSAME_INODE(A,B) false
53+
#endif
4754

4855
char*Dynamic_library_path;
4956

@@ -121,7 +128,9 @@ load_external_function(char *filename, char *funcname,
121128
MemSet((char*)file_scanner,0,sizeof(DynamicFileList));
122129
strcpy(file_scanner->filename,fullname);
123130
file_scanner->device=stat_buf.st_dev;
131+
#ifndefWIN32
124132
file_scanner->inode=stat_buf.st_ino;
133+
#endif
125134
file_scanner->next=NULL;
126135

127136
file_scanner->handle=pg_dlopen(fullname);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp