Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 612654767E0 for ; Thu, 5 Dec 2002 17:53:33 -0500 (EST) Received: from mail.pushcorp.com (user-v3qs7q3.biz.mindspring.com [199.174.31.67]) by postgresql.org (Postfix) with ESMTP id 6F61C476ABD for ; Thu, 5 Dec 2002 17:01:49 -0500 (EST) Received: from soupcan (firewall.pushcorp.com [199.174.31.66]) by mail.pushcorp.com (Postfix) with SMTP id 49D8A3AD31 for ; Thu, 5 Dec 2002 14:54:43 -0600 (CST) Message-ID: <006301c29caa$69d89450$0c00000a@soupcan> From: "Lester Godwin" To: Subject: Borland makefile for libpq... Date: Thu, 5 Dec 2002 16:05:24 -0600 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0060_01C29C78.1EFAD9C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/16 X-Sequence-Number: 3429 This is a multi-part message in MIME format. ------=_NextPart_000_0060_01C29C78.1EFAD9C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I am new to contributing to open-source project, but I have an interest in using PostgreSQL for my business on a Linux file server. My client software, however, will be running on Windows NT workstations developed using Borland C++ Builder. I was quite disappointed that there was no way to compile the libpq library using Borland tools, so I "scratched the itch" and created / modified the attached files to compile the PostgreSQL 7.3 libpq static and dynamic libraries. I had done the same with version 7.2.3, however, many more modifications were required to keep the compiler happy than with 7.3. Anyhow, I believe that some people out there may find it useful to be able to compile the libary using the freely downloadable Borland command-line compiler or C++ Builder. As I mentioned the new make and .def files are attached. And the win32.h has just has a portion of it #ifdef'd out if the Borland compiler is used. Please educate me what the proper format/method should be to submit these files -- or if there is any interest in using them at all. In any case I am certainly looking forward to using PostgreSQL with C++ Builder! Thanks, Lester Godwin PushCorp, Inc. Tel 972.840.0208 Ext 412 Fax 972.840.1046 godwin@pushcorp.com www.pushcorp.com ------=_NextPart_000_0060_01C29C78.1EFAD9C0 Content-Type: application/octet-stream; name="win32.h" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="win32.h" #ifndef __win32_h_included #define __win32_h_included /* * strcasecmp() is not in Windows, stricmp is, though */ #define strcasecmp(a,b) stricmp(a,b) #define strncasecmp(a,b,c) _strnicmp(a,b,c) /* * Some other compat functions */ #ifndef __BORLANDC__ /* Modified by LEGIV */ #define open(a,b,c) _open(a,b,c) #define close(a) _close(a) #define read(a,b,c) _read(a,b,c) #define write(a,b,c) _write(a,b,c) #endif #define popen(a,b) _popen(a,b) #define pclose(a) _pclose(a) #define vsnprintf(a,b,c,d) _vsnprintf(a,b,c,d) #define snprintf _snprintf /* * crypt not available (yet) */ #define crypt(a,b) ((char *) a) #undef EAGAIN /* doesn't apply on sockets */ #undef EINTR #define EINTR WSAEINTR #define EWOULDBLOCK WSAEWOULDBLOCK #define ECONNRESET WSAECONNRESET #define EINPROGRESS WSAEINPROGRESS /* * support for handling Windows Socket errors */ extern const char *winsock_strerror(int eno); #endif ------=_NextPart_000_0060_01C29C78.1EFAD9C0 Content-Type: application/octet-stream; name="bcc32dll.def" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bcc32dll.def" LIBRARY LIBPQ EXPORTS _PQconnectdb @ 1 _PQsetdbLogin @ 2 _PQconndefaults @ 3 _PQfinish @ 4 _PQreset @ 5 _PQrequestCancel @ 6 _PQdb @ 7 _PQuser @ 8 _PQpass @ 9 _PQhost @ 10 _PQport @ 11 _PQtty @ 12 _PQoptions @ 13 _PQstatus @ 14 _PQerrorMessage @ 15 _PQsocket @ 16 _PQbackendPID @ 17 _PQtrace @ 18 _PQuntrace @ 19 _PQsetNoticeProcessor @ 20 _PQexec @ 21 _PQnotifies @ 22 _PQsendQuery @ 23 _PQgetResult @ 24 _PQisBusy @ 25 _PQconsumeInput @ 26 _PQgetline @ 27 _PQputline @ 28 _PQgetlineAsync @ 29 _PQputnbytes @ 30 _PQendcopy @ 31 _PQfn @ 32 _PQresultStatus @ 33 _PQntuples @ 34 _PQnfields @ 35 _PQbinaryTuples @ 36 _PQfname @ 37 _PQfnumber @ 38 _PQftype @ 39 _PQfsize @ 40 _PQfmod @ 41 _PQcmdStatus @ 42 _PQoidStatus @ 43 _PQcmdTuples @ 44 _PQgetvalue @ 45 _PQgetlength @ 46 _PQgetisnull @ 47 _PQclear @ 48 _PQmakeEmptyPGresult @ 49 _PQprint @ 50 _PQdisplayTuples @ 51 _PQprintTuples @ 52 _lo_open @ 53 _lo_close @ 54 _lo_read @ 55 _lo_write @ 56 _lo_lseek @ 57 _lo_creat @ 58 _lo_tell @ 59 _lo_unlink @ 60 _lo_import @ 61 _lo_export @ 62 _pgresStatus @ 63 _PQmblen @ 64 _PQresultErrorMessage @ 65 _PQresStatus @ 66 _term_PQExpBuffer @ 67 _append_PQExpBufferChar @ 68 _init_PQExpBuffer @ 69 _reset_PQExpBuffer @ 70 _PQoidValue @ 71 _PQclientEncoding @ 72 _PQenv2encoding @ 73 _appendBinary_PQExpBuffer @ 74 _append_PQExpBufferStr @ 75 _destroy_PQExpBuffer @ 76 _create_PQExpBuffer @ 77 _PQconninfoFree @ 78 _PQconnectPoll @ 79 _PQconnectStart @ 80 _PQflush @ 81 _PQisnonblocking @ 82 _PQresetPoll @ 83 _PQresetStart @ 84 _PQsetClientEncoding @ 85 _PQsetnonblocking @ 86 _PQfreeNotify @ 87 _PQescapeString @ 88 _PQescapeBytea @ 89 _printf_PQExpBuffer @ 90 _append_PQExpBuffer @ 91 _pg_encoding_to_char @ 92 _pg_utf_mblen @ 93 ------=_NextPart_000_0060_01C29C78.1EFAD9C0 Content-Type: application/octet-stream; name="bcc32.mak" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="bcc32.mak" # Makefile for Borland C++ # Will build a Win32 static library libpq.lib # and a Win32 dynamic library libpq.dll with import library libpqdll= .lib !MESSAGE Building the Win32 DLL and Static Library... !MESSAGE !IF "$(CFG)" =3D=3D "" CFG=3DRelease !MESSAGE No configuration specified. Defaulting to Release. !MESSAGE !ELSE !MESSAGE Configuration "$(CFG)" !MESSAGE !ENDIF !IF "$(CFG)" !=3D "Release" && "$(CFG)" !=3D "Debug" !MESSAGE Invalid configuration "$(CFG)" specified. !MESSAGE You can specify a configuration when running MAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE make -DCFG=3D[Release | Debug] /f bcc32.mak !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "Release" (Win32 Release DLL and Static Library) !MESSAGE "Debug" (Win32 Debug DLL and Static Library) !MESSAGE !ERROR An invalid configuration was specified. !ENDIF !IF "$(OS)" =3D=3D "Windows_NT" NULL=3D !ELSE=20 NULL=3Dnul !ENDIF=20 !IF "$(CFG)" =3D=3D "Debug" DEBUG=3D1 OUTDIR=3D.\Debug INTDIR=3D.\Debug !else OUTDIR=3D.\Release INTDIR=3D.\Release !endif # -------------------------------------------------------------------------= -- OBJFILES =3D pqexpbuffer.obj fe-connect.obj fe-exec.obj fe-lobj.obj \ fe-misc.obj fe-print.obj fe-auth.obj fe-secure.obj \=20 md5.obj dllist.obj win32.obj wchar.obj encnames.obj DEFFILE =3D bcc32dll.def USERDEFINES =3D FRONTEND;NDEBUG;WIN32;_WINDOWS;HAVE_VSNPRINTF;HAVE_STRDUP # -------------------------------------------------------------------------= -- CFLAG =3D -I..\..\include -WD -c -D$(USERDEFINES) -tWM \ -q -5 -a8 -pc -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc !IFDEF DEBUG CFLAG =3D $(CFLAG) -Od -r- -k -v -y -vi- -D_DEBUG !else CFLAG =3D $(CFLAG) -O -Oi -OS -DNDEBUG !endif LFLAGS =3D -Gn -L$(INTDIR) -x -Tpd -v # -------------------------------------------------------------------------= -- .path.obj =3D $(INTDIR) # -------------------------------------------------------------------------= -- #ALL: "$(OUTDIR)" "$(OUTDIR)\libpq.dll" "$(OUTDIR)\libpq.lib" ALL: "$(OUTDIR)" "$(OUTDIR)\libpq.lib" CLEAN : -@erase /S /Q $(INTDIR) -@erase /S /Q $(OUTDIR) -@rmdir $(INTDIR) -@rmdir $(OUTDIR) "$(OUTDIR)" : @if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" "$(OUTDIR)\libpq.dll": libpqdll.obj $(OBJFILES) ilink32 @&&! $(LFLAGS) + c0d32.obj $(OBJFILES), + $@,, + import32.lib cw32mt.lib, + $(DEFFILE), + $(ALLRES) ! implib $(OUTDIR)/libpqdll.lib $@ "$(OUTDIR)\libpq.lib": $(OBJFILES) tlib $@ @&&! +-"$(**: =3D" &^ +-")" ! md5.obj: ..\..\backend\libpq\md5.c=20 dllist.obj: ..\..\backend\lib\dllist.c wchar.obj: ..\..\backend\utils\mb\wchar.c encnames.obj: ..\..\backend\utils\mb\encnames.c # -------------------------------------------------------------------------= -- .c.obj: bcc32 -o"$(INTDIR)\$&" $(CFLAG) $< ------=_NextPart_000_0060_01C29C78.1EFAD9C0--