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

Commitf6b896b

Browse files
committed
Improve MS VC builds for psql by handlling flex properly and prevent
rename prototype conflict.
1 parenta6cb7fd commitf6b896b

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

‎src/bin/psql/bcc32.mak

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ NULL=nul
3737

3838
CPP=bcc32.exe
3939
PERL=perl.exe
40+
FLEX=flex.exe
4041

4142
!IF "$(CFG)" == "Debug"
4243
DEBUG=1
@@ -53,7 +54,7 @@ REFDOCDIR=../../../doc/src/sgml/ref
5354
.c.obj:
5455
$(CPP) -o"$(INTDIR)\$&"$(CPP_PROJ)$<
5556

56-
ALL : sql_help.h "..\..\port\pg_config_paths.h" "$(OUTDIR)\psql.exe"
57+
ALL : sql_help.hpsqlscan.c"..\..\port\pg_config_paths.h" "$(OUTDIR)\psql.exe"
5758

5859
CLEAN :
5960
-@erase"$(INTDIR)\command.obj"
@@ -158,3 +159,6 @@ path.obj : "$(OUTDIR)" ..\..\port\path.c
158159

159160
"sql_help.h": create_help.pl
160161
$(PERL) create_help.pl $(REFDOCDIR) $@
162+
163+
psqlscan.c : psqlscan.l
164+
$(FLEX) -Cfe -opsqlscan.c psqlscan.l

‎src/bin/psql/win32.mak

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ NULL=nul
88

99
CPP=cl.exe
1010
PERL=perl.exe
11+
FLEX=flex.exe
1112

1213
OUTDIR=.\Release
1314
INTDIR=.\Release
@@ -16,7 +17,7 @@ REFDOCDIR= ../../../doc/src/sgml/ref
1617
OutDir=.\Release
1718
# End Custom Macros
1819

19-
ALL : sql_help.h "..\..\port\pg_config_paths.h" "$(OUTDIR)\psql.exe"
20+
ALL : sql_help.hpsqlscan.c"..\..\port\pg_config_paths.h" "$(OUTDIR)\psql.exe"
2021

2122
CLEAN :
2223
-@erase"$(INTDIR)\command.obj"
@@ -127,5 +128,8 @@ LINK32_OBJS= \
127128
$(CPP_PROJ) $<
128129
<<
129130

130-
sql_help.h: create_help.pl
131+
sql_help.h: create_help.pl
131132
$(PERL) create_help.pl $(REFDOCDIR) $@
133+
134+
psqlscan.c: psqlscan.l
135+
$(FLEX) -Cfe -opsqlscan.c psqlscan.l

‎src/include/port.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/include/port.h,v 1.61 2004/09/09 14:18:20 momjian Exp $
9+
* $PostgreSQL: pgsql/src/include/port.h,v 1.62 2004/09/27 20:37:20 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -168,6 +168,11 @@ extern intpgrename(const char *from, const char *to);
168168
externintpgunlink(constchar*path);
169169
externintpgsymlink(constchar*oldpath,constchar*newpath);
170170

171+
/* Include this first so later includes don't see these defines */
172+
#ifdef_MSC_VER
173+
#include<io.h>
174+
#endif
175+
171176
#definerename(from,to)pgrename(from, to)
172177
#defineunlink(path)pgunlink(path)
173178
#definesymlink(oldpath,newpath)pgsymlink(oldpath, newpath)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp