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

Commit945d0b4

Browse files
committed
Allow Borland CC to compile libpq and psql.
L Bayuk
1 parent7f1bc23 commit945d0b4

File tree

3 files changed

+36
-7
lines changed

3 files changed

+36
-7
lines changed

‎src/bin/psql/bcc32.mak

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ INTDIR=.\Release
6060
!endif
6161
REFDOCDIR=../../../doc/src/sgml/ref
6262

63-
CPP_PROJ = -I$(BCB)\include;..\..\include;..\..\interfaces\libpq;..\..\include\port\win32\
63+
CPP_PROJ = -I$(BCB)\include;..\..\include;..\..\interfaces\libpq;..\..\include\port\win32;..\..\include\port\win32_msvc;..\pg_dump;..\..\backend\
6464
-c -D$(USERDEFINES) -DFRONTEND -n"$(INTDIR)" -tWM -tWC -q -5 -a8 -pc -X -w-use\
6565
-w-par -w-pia -w-csu -w-aus -w-ccc
6666

@@ -98,16 +98,21 @@ CLEAN :
9898
-@erase"$(INTDIR)\mbprint.obj"
9999
-@erase"$(INTDIR)\print.obj"
100100
-@erase"$(INTDIR)\prompt.obj"
101+
-@erase"$(INTDIR)\psqlscan.obj"
101102
-@erase"$(INTDIR)\startup.obj"
102103
-@erase"$(INTDIR)\stringutils.obj"
103104
-@erase"$(INTDIR)\tab-complete.obj"
104105
-@erase"$(INTDIR)\variables.obj"
105106
-@erase"$(INTDIR)\exec.obj"
106107
-@erase"$(INTDIR)\getopt.obj"
107108
-@erase"$(INTDIR)\getopt_long.obj"
109+
-@erase"$(INTDIR)\snprintf.obj"
108110
-@erase"$(INTDIR)\path.obj"
111+
-@erase"$(INTDIR)\strlcpy.obj"
109112
-@erase"$(INTDIR)\pgstrcasecmp.obj"
110113
-@erase"$(INTDIR)\sprompt.obj"
114+
-@erase"$(INTDIR)\dumputils.obj"
115+
-@erase"$(INTDIR)\keywords.obj"
111116
-@erase"$(INTDIR)\psql.ilc"
112117
-@erase"$(INTDIR)\psql.ild"
113118
-@erase"$(INTDIR)\psql.tds"
@@ -138,9 +143,13 @@ LINK32_OBJS= \
138143
"$(INTDIR)\exec.obj"\
139144
"$(INTDIR)\getopt.obj"\
140145
"$(INTDIR)\getopt_long.obj"\
146+
"$(INTDIR)\snprintf.obj"\
141147
"$(INTDIR)\path.obj"\
148+
"$(INTDIR)\strlcpy.obj"\
142149
"$(INTDIR)\pgstrcasecmp.obj"\
143-
"$(INTDIR)\sprompt.obj"
150+
"$(INTDIR)\sprompt.obj"\
151+
"$(INTDIR)\dumputils.obj"\
152+
"$(INTDIR)\keywords.obj"
144153

145154
!IFDEF DEBUG
146155
LINK32_OBJS=$(LINK32_OBJS) "..\..\interfaces\libpq\Debug\blibpqddll.lib"
@@ -149,7 +158,7 @@ LINK32_OBJS= $(LINK32_OBJS) "..\..\interfaces\libpq\Release\blibpqdll.lib"
149158
!ENDIF
150159

151160
# Have to use \# so # isn't treated as a comment, but MSVC doesn't like this
152-
"..\..\port\pg_config_paths.h":win32.mak
161+
"..\..\port\pg_config_paths.h":bcc32.mak
153162
echo\#define PGBINDIR"">$@
154163
echo\#define PGSHAREDIR"">>$@
155164
echo\#define SYSCONFDIR"">>$@
@@ -188,11 +197,21 @@ LINK32_OBJS= $(LINK32_OBJS) "..\..\interfaces\libpq\Release\blibpqdll.lib"
188197
$(CPP_PROJ) ..\..\port\getopt_long.c
189198
<<
190199

200+
"$(INTDIR)\snprintf.obj" : "$(INTDIR)" ..\..\port\snprintf.c
201+
$(CPP) @<<
202+
$(CPP_PROJ) ..\..\port\snprintf.c
203+
<<
204+
191205
"$(INTDIR)\path.obj" : "$(INTDIR)" ..\..\port\path.c
192206
$(CPP) @<<
193207
$(CPP_PROJ) ..\..\port\path.c
194208
<<
195209

210+
"$(INTDIR)\strlcpy.obj" : "$(INTDIR)" ..\..\port\strlcpy.c
211+
$(CPP) @<<
212+
$(CPP_PROJ) ..\..\port\strlcpy.c
213+
<<
214+
196215
"$(INTDIR)\pgstrcasecmp.obj" : ..\..\port\pgstrcasecmp.c
197216
$(CPP) @<<
198217
$(CPP_PROJ) ..\..\port\pgstrcasecmp.c
@@ -203,6 +222,16 @@ LINK32_OBJS= $(LINK32_OBJS) "..\..\interfaces\libpq\Release\blibpqdll.lib"
203222
$(CPP_PROJ) ..\..\port\sprompt.c
204223
<<
205224

225+
"$(INTDIR)\dumputils.obj" : "$(INTDIR)" ..\pg_dump\dumputils.c
226+
$(CPP) @<<
227+
$(CPP_PROJ) ..\pg_dump\dumputils.c
228+
<<
229+
230+
"$(INTDIR)\keywords.obj" : "$(INTDIR)" ..\..\backend\parser\keywords.c
231+
$(CPP) @<<
232+
$(CPP_PROJ) ..\..\backend\parser\keywords.c
233+
<<
234+
206235
"sql_help.h": create_help.pl
207236
$(PERL) create_help.pl $(REFDOCDIR) $@
208237

‎src/include/c.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $PostgreSQL: pgsql/src/include/c.h,v 1.215 2007/01/05 22:19:50 momjian Exp $
15+
* $PostgreSQL: pgsql/src/include/c.h,v 1.216 2007/01/11 02:39:52 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -59,7 +59,7 @@
5959
#include"postgres_ext.h"
6060
#include"pg_trace.h"
6161

62-
#ifdefined(__BORLANDC__)|| (_MSC_VER >=1400)
62+
#if_MSC_VER >=1400
6363
#defineerrcode __msvc_errcode
6464
#include<crtdefs.h>
6565
#undef errcode

‎src/include/port.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2007, 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.107 2007/01/05 22:19:50 momjian Exp $
9+
* $PostgreSQL: pgsql/src/include/port.h,v 1.108 2007/01/11 02:39:52 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -343,7 +343,7 @@ extern char *strdup(const char *str);
343343
externsize_tstrlcpy(char*dst,constchar*src,size_tsiz);
344344
#endif
345345

346-
#ifndefHAVE_RANDOM
346+
#if !defined(HAVE_RANDOM)&& !defined(__BORLANDC__)
347347
externlongrandom(void);
348348
#endif
349349

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp