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

Commitb14295c

Browse files
committed
Attached is the complete diff against current CVS.
Compiles on BCC 5.5 and VC++ 6.0 (with warnings).Karl Waclawek
1 parentdc4ee8a commitb14295c

File tree

19 files changed

+135
-27
lines changed

19 files changed

+135
-27
lines changed

‎src/backend/libpq/ip.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/libpq/ip.c,v 1.14 2003/06/12 08:11:07 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/libpq/ip.c,v 1.15 2003/06/12 08:15:28 momjian Exp $
1212
*
1313
* This file and the IPV6 implementation were initially provided by
1414
* Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design
@@ -20,6 +20,8 @@
2020
/* This is intended to be used in both frontend and backend, so use c.h */
2121
#include"c.h"
2222

23+
#if !defined(_MSC_VER)&& !defined(__BORLANDC__)
24+
2325
#include<errno.h>
2426
#include<unistd.h>
2527
#include<sys/types.h>
@@ -33,6 +35,8 @@
3335
#include<arpa/inet.h>
3436
#include<sys/file.h>
3537

38+
#endif
39+
3640
#include"libpq/ip.h"
3741

3842

‎src/backend/utils/mb/encnames.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Encoding names and routines for work with it. All
33
* in this file is shared bedween FE and BE.
44
*
5-
* $Id: encnames.c,v 1.15 2003/06/12 08:11:07 momjian Exp $
5+
* $Id: encnames.c,v 1.16 2003/06/12 08:15:28 momjian Exp $
66
*/
77
#ifdefFRONTEND
88
#include"postgres_fe.h"
@@ -13,7 +13,9 @@
1313
#include"utils/builtins.h"
1414
#endif
1515

16+
#if !defined(_MSC_VER)&& !defined(__BORLANDC__)
1617
#include<unistd.h>
18+
#endif
1719

1820
#include"mb/pg_wchar.h"
1921
#include<ctype.h>

‎src/bin/psql/bcc32.mak

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Makefile for Borland C++ 5.5
22
# Borland C++ base install directory goes here
3-
BCB=d:\Borland\Bcc55
3+
#BCB=d:\Borland\Bcc55
44

55
!MESSAGE Building PSQL.EXE ...
66
!MESSAGE
@@ -36,6 +36,7 @@ NULL=nul
3636
!ENDIF
3737

3838
CPP=bcc32.exe
39+
PERL=perl.exe
3940

4041
!IF "$(CFG)" == "Debug"
4142
DEBUG=1
@@ -45,13 +46,14 @@ INTDIR=.\Debug
4546
OUTDIR=.\Release
4647
INTDIR=.\Release
4748
!endif
49+
REFDOCDIR=../../../doc/src/sgml/ref
4850

4951
.path.obj =$(INTDIR)
5052

5153
.c.obj:
5254
$(CPP) -o"$(INTDIR)\$&"$(CPP_PROJ)$<
5355

54-
ALL : "$(OUTDIR)\psql.exe"
56+
ALL : "sql_help.h" "$(OUTDIR)\psql.exe"
5557

5658
CLEAN :
5759
-@erase"$(INTDIR)\command.obj"
@@ -70,6 +72,8 @@ CLEAN :
7072
-@erase"$(INTDIR)\describe.obj"
7173
-@erase"$(INTDIR)\tab-complete.obj"
7274
-@erase"$(INTDIR)\getopt.obj"
75+
-@erase"$(INTDIR)\getopt_long.obj"
76+
-@erase"$(INTDIR)\path.obj"
7377
-@erase"$(INTDIR)\mbprint.obj"
7478
-@erase"$(INTDIR)\psql.ilc"
7579
-@erase"$(INTDIR)\psql.ild"
@@ -84,8 +88,8 @@ CLEAN :
8488
USERDEFINES = WIN32;_CONSOLE;_MBCS;HAVE_STRDUP
8589

8690
# ---------------------------------------------------------------------------
87-
CPP_PROJ = -I$(BCB)\include;..\..\include;..\..\interfaces\libpq -c -D$(USERDEFINES) -tWM -tWC\
88-
-q -5 -a8 -pc -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc
91+
CPP_PROJ = -I$(BCB)\include;..\..\include;..\..\interfaces\libpq -c -D$(USERDEFINES) -DFRONTEND\
92+
-tWM -tWC-q -5 -a8 -pc -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc
8993

9094
!IFDEF DEBUG
9195
CPP_PROJ =$(CPP_PROJ) -Od -r- -k -v -y -vi- -D_DEBUG
@@ -122,6 +126,8 @@ LINK32_OBJS= \
122126
describe.obj\
123127
tab-complete.obj\
124128
getopt.obj\
129+
getopt_long.obj\
130+
path.obj\
125131
mbprint.obj
126132

127133

@@ -134,3 +140,8 @@ LINK32_OBJS= \
134140
!
135141

136142
getopt.obj : "$(OUTDIR)" ..\..\port\getopt.c
143+
getopt_long.obj : "$(OUTDIR)" ..\..\port\getopt_long.c
144+
path.obj : "$(OUTDIR)" ..\..\port\path.c
145+
146+
"sql_help.h": create_help.pl
147+
$(PERL) create_help.pl $(REFDOCDIR) $@

‎src/bin/psql/common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.63 2003/06/1207:52:51 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.64 2003/06/1208:15:28 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"common.h"
@@ -48,7 +48,7 @@ typedef struct timeval TimevalStruct;
4848
#else
4949

5050
typedefstruct_timebTimevalStruct;
51-
#defineGETTIMEOFDAY(T) _ftime(&T)
51+
#defineGETTIMEOFDAY(T) _ftime(T)
5252
#defineDIFF_MSEC(T,U) ((((T)->time - (U)->time) * 1000.0 + (T)->millitm - (U)->millitm))
5353

5454
#endif

‎src/bin/psql/print.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.38 2003/06/1207:52:51 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.39 2003/06/1208:15:28 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"common.h"
1010
#include"print.h"
1111

1212
#include<math.h>
1313
#include<signal.h>
14+
15+
#if !defined(_MSC_VER)&& !defined(__BORLANDC__)
1416
#include<unistd.h>
17+
#endif
1518

1619
#ifndefWIN32
1720
#include<sys/ioctl.h>/* for ioctl() */

‎src/bin/psql/win32.mak

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,18 @@ CLEAN :
3535
-@erase"$(INTDIR)\describe.obj"
3636
-@erase"$(INTDIR)\tab-complete.obj"
3737
-@erase"$(INTDIR)\getopt.obj"
38+
-@erase"$(INTDIR)\getopt_long.obj"
39+
-@erase"$(INTDIR)\path.obj"
3840
-@erase"$(INTDIR)\mbprint.obj"
39-
-@erase"$(INTDIR)\vc50.idb"
41+
-@erase"$(INTDIR)\*psql.pch"
4042
-@erase"$(OUTDIR)\psql.exe"
4143

4244
"$(OUTDIR)" :
4345
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
4446

4547
CPP_PROJ=/nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D\
4648
"_MBCS" /Fp"$(INTDIR)\psql.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c\
47-
/I ..\..\include /I ..\..\interfaces\libpq /D "HAVE_STRDUP"
49+
/I ..\..\include /I ..\..\interfaces\libpq /D "HAVE_STRDUP" /D "FRONTEND"
4850

4951
CPP_OBJS=.\Release/
5052
CPP_SBRS=.
@@ -71,6 +73,8 @@ LINK32_OBJS= \
7173
"$(INTDIR)\describe.obj"\
7274
"$(INTDIR)\tab-complete.obj"\
7375
"$(INTDIR)\getopt.obj"\
76+
"$(INTDIR)\getopt_long.obj"\
77+
"$(INTDIR)\path.obj"\
7478
"$(INTDIR)\mbprint.obj"\
7579
"..\..\interfaces\libpq\Release\libpqdll.lib"
7680

@@ -84,6 +88,16 @@ LINK32_OBJS= \
8488
$(CPP_PROJ) ..\..\port\getopt.c
8589
<<
8690

91+
"$(OUTDIR)\getopt_long.obj" : "$(OUTDIR)" ..\..\port\getopt_long.c
92+
$(CPP) @<<
93+
$(CPP_PROJ) ..\..\port\getopt_long.c
94+
<<
95+
96+
"$(OUTDIR)\path.obj" : "$(OUTDIR)" ..\..\port\path.c
97+
$(CPP) @<<
98+
$(CPP_PROJ) ..\..\port\path.c
99+
<<
100+
87101
.c{$(CPP_OBJS)}.obj::
88102
$(CPP) @<<
89103
$(CPP_PROJ) $<

‎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-2002, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $Id: c.h,v 1.149 2003/06/12 08:11:07 momjian Exp $
15+
* $Id: c.h,v 1.150 2003/06/12 08:15:29 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -73,7 +73,7 @@
7373
#include<SupportDefs.h>
7474
#endif
7575

76-
#ifdefWIN32
76+
#if defined(WIN32)&& !defined(_MSC_VER)&& !defined(__BORLANDC__)
7777
/* We have to redefine some system functions after they are included above */
7878
#include"pg_config_os.h"
7979
#endif

‎src/include/getaddrinfo.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@
1616
*
1717
* Copyright (c) 2003, PostgreSQL Global Development Group
1818
*
19-
* $Id: getaddrinfo.h,v 1.5 2003/06/12 08:11:07 momjian Exp $
19+
* $Id: getaddrinfo.h,v 1.6 2003/06/12 08:15:29 momjian Exp $
2020
*
2121
*-------------------------------------------------------------------------
2222
*/
2323
#ifndefGETADDRINFO_H
2424
#defineGETADDRINFO_H
2525

26+
#if !defined(_MSC_VER)&& !defined(__BORLANDC__)
2627
#include<sys/socket.h>
2728
#include<netdb.h>
29+
#endif
2830

2931

3032
#ifndefHAVE_STRUCT_ADDRINFO

‎src/include/pg_config.h.win32

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
#define HAVE_ATEXIT
2222
#define HAVE_MEMMOVE
2323

24+
#ifdef __BORLANDC__
25+
#define HAVE_RANDOM
26+
#endif
27+
2428
/* use _snprintf instead of snprintf */
2529
#defineHAVE_DECL_SNPRINTF 1
2630
#define snprintf_snprintf

‎src/include/port.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: port.h,v 1.5 2003/06/12 08:11:07 momjian Exp $
9+
* $Id: port.h,v 1.6 2003/06/12 08:15:29 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -76,8 +76,10 @@ extern double rint(double x);
7676
#endif
7777

7878
#ifndefHAVE_INET_ATON
79+
#if !defined(_MSC_VER)&& !defined(__BORLANDC__)
7980
# include<netinet/in.h>
8081
# include<arpa/inet.h>
82+
#endif
8183
externintinet_aton(constchar*cp,structin_addr*addr);
8284
#endif
8385

‎src/interfaces/libpq/bcc32.mak

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and a Win32 dynamic library libpq.dll with import library libpqdll.lib
55

66
# Borland C++ base install directory goes here
7-
BCB=d:\Borland\Bcc55
7+
#BCB=d:\Borland\Bcc55
88

99
!MESSAGE Building the Win32 DLL and Static Library...
1010
!MESSAGE
@@ -63,9 +63,16 @@ LIB32=tlib.exe
6363
LIB32_FLAGS=
6464
LIB32_OBJS=\
6565
"$(OUTDIR)\win32.obj"\
66+
"$(INTDIR)\getaddrinfo.obj"\
67+
"$(INTDIR)\inet_aton.obj"\
68+
"$(INTDIR)\crypt.obj"\
69+
"$(INTDIR)\path.obj"\
6670
"$(INTDIR)\dllist.obj"\
6771
"$(INTDIR)\md5.obj"\
72+
"$(INTDIR)\ip.obj"\
6873
"$(INTDIR)\fe-auth.obj"\
74+
"$(INTDIR)\fe-protocol2.obj"\
75+
"$(INTDIR)\fe-protocol3.obj"\
6976
"$(INTDIR)\fe-connect.obj"\
7077
"$(INTDIR)\fe-exec.obj"\
7178
"$(INTDIR)\fe-lobj.obj"\
@@ -77,7 +84,7 @@ LIB32_OBJS= \
7784
"$(INTDIR)\encnames.obj"
7885

7986
RSC=brcc32.exe
80-
RSC_PROJ=/l 0x409/fo"$(INTDIR)\libpq.res"
87+
RSC_PROJ=-l 0x409-i$(BCB)\include -fo"$(INTDIR)\libpq.res"
8188

8289
LINK32=ilink32.exe
8390
LINK32_FLAGS = -Gn -L$(BCB)\lib;$(INTDIR); -x -Tpd -v
@@ -86,16 +93,23 @@ LINK32_OBJS= "$(INTDIR)\libpqdll.obj"
8693
# ---------------------------------------------------------------------------
8794

8895
.path.obj =$(INTDIR)
89-
.path.c = .;..\..\backend\libpq;..\..\backend\lib;..\..\backend\utils\mb
96+
.path.c = .;..\..\port;..\..\backend\libpq;..\..\backend\lib;..\..\backend\utils\mb
9097

9198
# ---------------------------------------------------------------------------
9299

93100
ALL: "$(OUTDIR)" "$(OUTDIR)\blibpq.dll" "$(OUTDIR)\blibpq.lib"
94101

95102
CLEAN :
103+
-@erase"$(INTDIR)\getaddrinfo.obj"
104+
-@erase"$(INTDIR)\inet_aton.obj"
105+
-@erase"$(INTDIR)\crypt.obj"
106+
-@erase"$(INTDIR)\path.obj"
96107
-@erase"$(INTDIR)\dllist.obj"
97108
-@erase"$(INTDIR)\md5.obj"
109+
-@erase"$(INTDIR)\ip.obj"
98110
-@erase"$(INTDIR)\fe-auth.obj"
111+
-@erase"$(INTDIR)\fe-protocol2.obj"
112+
-@erase"$(INTDIR)\fe-protocol3.obj"
99113
-@erase"$(INTDIR)\fe-connect.obj"
100114
-@erase"$(INTDIR)\fe-exec.obj"
101115
-@erase"$(INTDIR)\fe-lobj.obj"
@@ -125,7 +139,7 @@ CLEAN :
125139
"$(OUTDIR)\blibpq.lib" import32.lib cw32mti.lib, +
126140
blibpqdll.def,"$(INTDIR)\libpq.res"
127141
!
128-
implib -a "$(OUTDIR)\blibpqdll.lib" blibpqdll.def $@
142+
implib -w "$(OUTDIR)\blibpqdll.lib" blibpqdll.def $@
129143

130144
"$(INTDIR)\libpq.res" : "$(INTDIR)" libpq.rc
131145
$(RSC) $(RSC_PROJ) libpq.rc

‎src/interfaces/libpq/blibpqdll.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ EXPORTS
9696
_pg_encoding_to_char @ 92
9797
_pg_utf_mblen @ 93
9898
_PQunescapeBytea @ 94
99-
_PQfreeMem @ 95
99+
_PQfreemem @ 95
100100

101101
; Aliases for MS compatible names
102102
PQconnectdb = _PQconnectdb
@@ -193,5 +193,5 @@ EXPORTS
193193
pg_encoding_to_char = _pg_encoding_to_char
194194
pg_utf_mblen = _pg_utf_mblen
195195
PQunescapeBytea = _PQunescapeBytea
196-
PQfreeMem =_PQfreeMem
196+
PQfreemem =_PQfreemem
197197

‎src/interfaces/libpq/fe-connect.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.246 2003/06/12 08:11:07 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.247 2003/06/12 08:15:29 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -49,6 +49,10 @@
4949
#include"libpq/ip.h"
5050
#include"mb/pg_wchar.h"
5151

52+
/* For FNCTL_NONBLOCK */
53+
#if defined(WIN32)|| defined(__BEOS__)
54+
longioctlsocket_ret;
55+
#endif
5256

5357
#definePGPASSFILE ".pgpass"
5458

‎src/interfaces/libpq/fe-misc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Portions Copyright (c) 1994, Regents of the University of California
2424
*
2525
* IDENTIFICATION
26-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.94 2003/06/12 08:11:07 momjian Exp $
26+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.95 2003/06/12 08:15:29 momjian Exp $
2727
*
2828
*-------------------------------------------------------------------------
2929
*/
@@ -33,8 +33,11 @@
3333
#include<errno.h>
3434
#include<signal.h>
3535
#include<time.h>
36+
37+
#if !defined(_MSC_VER)&& !defined(__BORLANDC__)
3638
#include<netinet/in.h>
3739
#include<arpa/inet.h>
40+
#endif
3841

3942
#ifdefWIN32
4043
#include"win32.h"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp