File tree 2 files changed +19
-4
lines changed
2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 4
4
#
5
5
# Copyright (c) 1994, Regents of the University of California
6
6
#
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 $
8
8
#
9
9
# -------------------------------------------------------------------------
10
10
@@ -138,8 +138,12 @@ endif
138
138
139
139
install-bin : postgres $(POSTGRES_IMP ) installdirs
140
140
$(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
143
147
ifeq ($(MAKE_EXPORTS ) , true)
144
148
$(INSTALL_DATA) $(POSTGRES_IMP) $(DESTDIR)$(pkglibdir)/$(POSTGRES_IMP)
145
149
endif
Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* 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 $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -49,12 +49,23 @@ ValidateBinary(char *path)
49
49
uid_t euid ;
50
50
struct group * gp ;
51
51
struct passwd * pwp ;
52
+ char path_exe [MAXPGPATH + 2 + strlen (".exe" )];
52
53
#endif
53
54
int i ;
54
55
int is_r = 0 ;
55
56
int is_x = 0 ;
56
57
int in_grp = 0 ;
57
58
59
+ #ifdef WIN32
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
+
58
69
/*
59
70
* Ensure that the file exists and is a regular file.
60
71
*
You can’t perform that action at this time.
0 commit comments