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

Commit6da56f3

Browse files
committed
Remove support for bcc and msvc standalone libpq builds
This removes the support for building just libpq using Borland C++ orVisual C++. This has not worked properly for years, and given the numberof complaints it's clearly not worth the maintenance burden.Building libpq using the standard MSVC build system is of course stillsupported, along with mingw.
1 parent258cef1 commit6da56f3

File tree

12 files changed

+8
-930
lines changed

12 files changed

+8
-930
lines changed

‎doc/src/sgml/install-windows.sgml

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@
3434
<productname>Windows</productname>.
3535
</para>
3636

37-
<para>
38-
Finally, the client access library
39-
(<application>libpq</application>) can be built using
40-
<productname>Visual C++ 7.1</productname> or
41-
<productname>Borland C++</productname> for compatibility with statically
42-
linked applications built using these tools.
43-
</para>
44-
4537
<para>
4638
Building using <productname>MinGW</productname> or
4739
<productname>Cygwin</productname> uses the normal build system, see
@@ -539,113 +531,4 @@ $ENV{DOCROOT}='c:\docbook';
539531
</sect2>
540532

541533
</sect1>
542-
543-
<sect1 id="install-windows-libpq">
544-
<title>Building <application>libpq</application> with
545-
<productname>Visual C++</productname> or
546-
<productname>Borland C++</productname></title>
547-
548-
<para>
549-
Using <productname>Visual C++ 7.1-9.0</productname> or
550-
<productname>Borland C++</productname> to build libpq is only recommended
551-
if you need a version with different debug/release flags, or if you need a
552-
static library to link into an application. For normal use the
553-
<productname>MinGW</productname> or
554-
<productname>Visual Studio</productname> or
555-
<productname>Windows SDK</productname> method is recommended.
556-
</para>
557-
558-
<para>
559-
To build the <application>libpq</application> client library using
560-
<productname>Visual Studio 7.1 or later</productname>, change into the
561-
<filename>src</filename> directory and type the command:
562-
<screen>
563-
<userinput>nmake /f win32.mak</userinput>
564-
</screen>
565-
</para>
566-
<para>
567-
To build a 64-bit version of the <application>libpq</application>
568-
client library using <productname>Visual Studio 8.0 or
569-
later</productname>, change into the <filename>src</filename>
570-
directory and type in the command:
571-
<screen>
572-
<userinput>nmake /f win32.mak CPU=AMD64</userinput>
573-
</screen>
574-
See the <filename>win32.mak</filename> file for further details
575-
about supported variables.
576-
</para>
577-
578-
<para>
579-
To build the <application>libpq</application> client library using
580-
<productname>Borland C++</productname>, change into the
581-
<filename>src</filename> directory and type the command:
582-
<screen>
583-
<userinput>make -N -DCFG=Release /f bcc32.mak</userinput>
584-
</screen>
585-
</para>
586-
587-
<sect2>
588-
<title>Generated Files</title>
589-
<para>
590-
The following files will be built:
591-
592-
<variablelist>
593-
<varlistentry>
594-
<term><filename>interfaces\libpq\Release\libpq.dll</filename></term>
595-
<listitem>
596-
<para>
597-
The dynamically linkable frontend library
598-
</para>
599-
</listitem>
600-
</varlistentry>
601-
602-
<varlistentry>
603-
<term><filename>interfaces\libpq\Release\libpqdll.lib</filename></term>
604-
<listitem>
605-
<para>
606-
Import library to link your programs to <filename>libpq.dll</filename>
607-
</para>
608-
</listitem>
609-
</varlistentry>
610-
611-
<varlistentry>
612-
<term><filename>interfaces\libpq\Release\libpq.lib</filename></term>
613-
<listitem>
614-
<para>
615-
Static version of the frontend library
616-
</para>
617-
</listitem>
618-
</varlistentry>
619-
620-
</variablelist>
621-
</para>
622-
623-
<para>
624-
Normally you do not need to install any of the client files. You should
625-
place the <filename>libpq.dll</filename> file in the same directory
626-
as your applications executable file. Do not install
627-
<filename>libpq.dll</filename> into your <filename>Windows</>,
628-
<filename>System</> or <filename>System32</> directory unless
629-
absolutely necessary.
630-
If this file is installed using a setup program, then it should
631-
be installed with version checking using the
632-
<symbol>VERSIONINFO</symbol> resource included in the file, to
633-
ensure that a newer version of the library is not overwritten.
634-
</para>
635-
636-
<para>
637-
If you are planning to do development using <application>libpq</application>
638-
on this machine, you will have to add the
639-
<filename>src\include</filename> and
640-
<filename>src\interfaces\libpq</filename> subdirectories of the source
641-
tree to the include path in your compiler's settings.
642-
</para>
643-
644-
<para>
645-
To use the library, you must add the
646-
<filename>libpqdll.lib</filename> file to your project. (In Visual
647-
C++, just right-click on the project and choose to add it.)
648-
</para>
649-
</sect2>
650-
</sect1>
651534
</chapter>

‎src/Makefile.shlib

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -405,30 +405,22 @@ endif # PORTNAME == cygwin || PORTNAME == win32
405405
# tarballs.
406406

407407
ifneq (,$(SHLIB_EXPORTS))
408-
distprep: lib$(NAME)dll.def lib$(NAME)ddll.def blib$(NAME)dll.def
408+
distprep: lib$(NAME)dll.def lib$(NAME)ddll.def
409409

410410
UC_NAME = $(shell echo $(NAME) | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
411411

412412
lib$(NAME)dll.def: $(SHLIB_EXPORTS)
413-
echo '; DEF file forwin32.mak release build and forMakefile.shlib (MinGW)' >$@
413+
echo '; DEF file for Makefile.shlib (MinGW)' >$@
414414
echo 'LIBRARY LIB$(UC_NAME).dll' >>$@
415415
echo 'EXPORTS' >>$@
416416
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
417417

418418
lib$(NAME)ddll.def: $(SHLIB_EXPORTS)
419-
echo '; DEF file forwin32.mak debug build' >$@
419+
echo '; DEF file forMakefile.shlib (MinGW)' >$@
420420
echo 'LIBRARY LIB$(UC_NAME)D.dll' >>$@
421421
echo 'EXPORTS' >>$@
422422
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1@ \2/' $< >>$@
423423

424-
blib$(NAME)dll.def: $(SHLIB_EXPORTS)
425-
echo '; DEF file for bcc32.mak (Borland C++ Builder)' >$@
426-
echo 'LIBRARY BLIB$(UC_NAME)' >>$@
427-
echo 'EXPORTS' >>$@
428-
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ _\1@ \2/' $< >>$@
429-
echo >>$@
430-
echo '; Aliases for MS compatible names' >> $@
431-
sed -e '/^#/d' -e 's/^\(.*[ ]\)\([0-9][0-9]*\)/ \1= _\1/' $< | sed 's/ *$$//' >>$@
432424
endif # SHLIB_EXPORTS
433425

434426

@@ -517,5 +509,5 @@ clean-lib:
517509

518510
ifneq (,$(SHLIB_EXPORTS))
519511
maintainer-clean-lib:
520-
rm -f lib$(NAME)dll.def lib$(NAME)ddll.def blib$(NAME)dll.def
512+
rm -f lib$(NAME)dll.def lib$(NAME)ddll.def
521513
endif

‎src/bcc32.mak

Lines changed: 0 additions & 47 deletions
This file was deleted.

‎src/bin/psql/command.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
#include"postgres_fe.h"
99
#include"command.h"
1010

11-
#ifdef__BORLANDC__/* needed for BCC */
12-
#undef mkdir
13-
#endif
14-
1511
#include<ctype.h>
1612
#include<time.h>
1713
#include<pwd.h>

‎src/include/getaddrinfo.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@
4444
#ifndefWSA_NOT_ENOUGH_MEMORY
4545
#defineWSA_NOT_ENOUGH_MEMORY(WSAENOBUFS)
4646
#endif
47-
#ifndef__BORLANDC__
4847
#defineWSATYPE_NOT_FOUND(WSABASEERR+109)
4948
#endif
50-
#endif
5149
#defineEAI_AGAINWSATRY_AGAIN
5250
#defineEAI_BADFLAGSWSAEINVAL
5351
#defineEAI_FAILWSANO_RECOVERY

‎src/include/port.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ extern size_t strlcat(char *dst, const char *src, size_t siz);
403403
externsize_tstrlcpy(char*dst,constchar*src,size_tsiz);
404404
#endif
405405

406-
#if !defined(HAVE_RANDOM)&& !defined(__BORLANDC__)
406+
#if !defined(HAVE_RANDOM)
407407
externlongrandom(void);
408408
#endif
409409

‎src/include/port/atomics/generic-msvc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#error "should be included via atomics.h"
2424
#endif
2525

26-
/* Should work on both MSVC and Borland. */
2726
#pragma intrinsic(_ReadWriteBarrier)
2827
#definepg_compiler_barrier_impl()_ReadWriteBarrier()
2928

‎src/include/port/win32.h

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* src/include/port/win32.h */
22

3-
#if defined(_MSC_VER)|| defined(__BORLANDC__)
3+
#if defined(_MSC_VER)
44
#defineWIN32_ONLY_COMPILER
55
#endif
66

@@ -32,9 +32,7 @@
3232
* Always build with SSPI support. Keep it as a #define in case
3333
* we want a switch to disable it sometime in the future.
3434
*/
35-
#ifndef__BORLANDC__
3635
#defineENABLE_SSPI 1
37-
#endif
3836

3937
/* undefine and redefine after #include */
4038
#undef mkdir
@@ -56,9 +54,7 @@
5654
#include<signal.h>
5755
#include<errno.h>
5856
#include<direct.h>
59-
#ifndef__BORLANDC__
6057
#include<sys/utime.h>/* for non-unicode version */
61-
#endif
6258
#undef near
6359

6460
/* Must be here to avoid conflicting with prototype in windows.h */
@@ -207,10 +203,8 @@
207203
#defineSIGTTIN21
208204
#defineSIGTTOU22/* Same as SIGABRT -- no problem, I hope */
209205
#defineSIGWINCH28
210-
#ifndef__BORLANDC__
211206
#defineSIGUSR130
212207
#defineSIGUSR231
213-
#endif
214208

215209
/*
216210
* New versions of mingw have gettimeofday() and also declare
@@ -421,7 +415,7 @@ extern intpgwin32_is_admin(void);
421415
#defineputenv(x) pgwin32_putenv(x)
422416
#defineunsetenv(x) pgwin32_unsetenv(x)
423417

424-
/* Things that exist in MingW headers, but need to be added to MSVC& BCC*/
418+
/* Things that exist in MingW headers, but need to be added to MSVC */
425419
#ifdefWIN32_ONLY_COMPILER
426420

427421
#ifndef_WIN64
@@ -430,7 +424,6 @@ typedef long ssize_t;
430424
typedef__int64ssize_t;
431425
#endif
432426

433-
#ifndef__BORLANDC__
434427
typedefunsigned shortmode_t;
435428

436429
#defineS_IRUSR _S_IREAD
@@ -440,7 +433,6 @@ typedef unsigned short mode_t;
440433
/* see also S_IRGRP etc below */
441434
#defineS_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
442435
#defineS_ISREG(m) (((m) & S_IFMT) == S_IFREG)
443-
#endif/* __BORLANDC__ */
444436

445437
#defineF_OK 0
446438
#defineW_OK 2
@@ -454,26 +446,9 @@ typedef unsigned short mode_t;
454446
/* Pulled from Makefile.port in mingw */
455447
#defineDLSUFFIX ".dll"
456448

457-
#ifdef__BORLANDC__
458-
459-
/* for port/dirent.c */
460-
#ifndefINVALID_FILE_ATTRIBUTES
461-
#defineINVALID_FILE_ATTRIBUTES ((DWORD) -1)
462-
#endif
463-
464-
/* for port/open.c */
465-
#ifndefO_RANDOM
466-
#defineO_RANDOM0x0010/* File access is primarily random */
467-
#defineO_SEQUENTIAL0x0020/* File access is primarily sequential */
468-
#defineO_TEMPORARY0x0040/* Temporary file bit */
469-
#defineO_SHORT_LIVED0x1000/* Temporary storage file, try not to flush */
470-
#define_O_SHORT_LIVEDO_SHORT_LIVED
471-
#endif/* ifndef O_RANDOM */
472-
#endif/* __BORLANDC__ */
473449
#endif/* WIN32_ONLY_COMPILER */
474450

475451
/* These aren't provided by either MingW or MSVC */
476-
#ifndef__BORLANDC__
477452
#defineS_IRGRP 0
478453
#defineS_IWGRP 0
479454
#defineS_IXGRP 0
@@ -482,5 +457,3 @@ typedef unsigned short mode_t;
482457
#defineS_IWOTH 0
483458
#defineS_IXOTH 0
484459
#defineS_IRWXO 0
485-
486-
#endif/* __BORLANDC__ */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp