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

Commit0a2c82b

Browse files
committed
Add .exe to Win32 stat calls. Don't symlink postmaster on Win32.
1 parent580fb7f commit0a2c82b

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

‎src/backend/Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.95 2003/03/21 17:18:34 petere Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.96 2003/11/11 03:53:32 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -138,8 +138,12 @@ endif
138138

139139
install-bin: postgres$(POSTGRES_IMP) installdirs
140140
$(INSTALL_PROGRAM) postgres$(X)$(DESTDIR)$(bindir)/postgres$(X)
141-
@rm -f$(DESTDIR)$(bindir)/postmaster
142-
ln -s postgres$(X)$(DESTDIR)$(bindir)/postmaster
141+
ifneq ($(PORTNAME), win32)
142+
@rm -f $(DESTDIR)$(bindir)/postmaster$(X)
143+
ln -s postgres$(X) $(DESTDIR)$(bindir)/postmaster$(X)
144+
else
145+
$(INSTALL_PROGRAM) postgres$(X) $(DESTDIR)$(bindir)/postmaster$(X)
146+
endif
143147
ifeq ($(MAKE_EXPORTS), true)
144148
$(INSTALL_DATA) $(POSTGRES_IMP) $(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)
145149
endif

‎src/backend/utils/init/findbe.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.37 2003/08/04 02:40:06 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.38 2003/11/11 03:53:33 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -49,12 +49,23 @@ ValidateBinary(char *path)
4949
uid_teuid;
5050
structgroup*gp;
5151
structpasswd*pwp;
52+
charpath_exe[MAXPGPATH+2+strlen(".exe")];
5253
#endif
5354
inti;
5455
intis_r=0;
5556
intis_x=0;
5657
intin_grp=0;
5758

59+
#ifdefWIN32
60+
/* Win32 requires a .exe suffix for stat() */
61+
if (strlen(path) >=4&&strcmp(path+strlen(path)-strlen(".exe"),".exe")!=0)
62+
{
63+
strcpy(path_exe,path);
64+
strcat(path_exe,".exe");
65+
path=path_exe;
66+
}
67+
#endif
68+
5869
/*
5970
* Ensure that the file exists and is a regular file.
6071
*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp