Skip to content

Commit b14295c

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 parent dc4ee8a commit b14295c

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
#ifdef FRONTEND
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/12 07:52:51 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.64 2003/06/12 08: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
typedef struct _timeb TimevalStruct;
51-
#define GETTIMEOFDAY(T) _ftime(&T)
51+
#define GETTIMEOFDAY(T) _ftime(T)
5252
#define DIFF_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/12 07:52:51 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.39 2003/06/12 08: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
#ifndef WIN32
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-
#ifdef WIN32
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
#ifndef GETADDRINFO_H
2424
#define GETADDRINFO_H
2525

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

2931

3032
#ifndef HAVE_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
#define HAVE_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
#ifndef HAVE_INET_ATON
79+
#if !defined(_MSC_VER) && !defined(__BORLANDC__)
7980
# include <netinet/in.h>
8081
# include <arpa/inet.h>
82+
#endif
8183
extern int inet_aton(const char *cp, struct in_addr * addr);
8284
#endif
8385

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy