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

Commitce53791

Browse files
committed
Assorted portability fixes for Borland C, from Pavel Golub.
1 parent85128e5 commitce53791

File tree

4 files changed

+29
-5
lines changed

4 files changed

+29
-5
lines changed

‎src/include/libpq/libpq-be.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/include/libpq/libpq-be.h,v 1.69 2009/01/01 17:23:59 momjian Exp $
14+
* $PostgreSQL: pgsql/src/include/libpq/libpq-be.h,v 1.70 2009/04/19 22:37:13 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -47,6 +47,9 @@
4747

4848
#ifdefENABLE_SSPI
4949
#defineSECURITY_WIN32
50+
#if defined(WIN32)&& !defined(WIN32_ONLY_COMPILER)
51+
#include<ntsecapi.h>
52+
#endif
5053
#include<security.h>
5154
#undef SECURITY_WIN32
5255

‎src/include/port/win32.h

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.86 2009/01/21 10:30:02 mha Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.87 2009/04/19 22:37:13 tgl Exp $ */
22

33
#if defined(_MSC_VER)|| defined(__BORLANDC__)
44
#defineWIN32_ONLY_COMPILER
@@ -297,7 +297,7 @@ extern void pgwin32_unsetenv(const char *);
297297
#defineputenv(x) pgwin32_putenv(x)
298298
#defineunsetenv(x) pgwin32_unsetenv(x)
299299

300-
/* Things that exist in MingW headers, but need to be added to MSVC */
300+
/* Things that exist in MingW headers, but need to be added to MSVC& BCC*/
301301
#ifdefWIN32_ONLY_COMPILER
302302
typedeflongssize_t;
303303
#ifndef__BORLANDC__
@@ -335,4 +335,22 @@ typedef unsigned short mode_t;
335335
/* Pulled from Makefile.port in mingw */
336336
#defineDLSUFFIX ".dll"
337337

338+
#ifdef__BORLANDC__
339+
340+
/* for port/dirent.c */
341+
#ifndefINVALID_FILE_ATTRIBUTES
342+
#defineINVALID_FILE_ATTRIBUTES ((DWORD) -1)
343+
#endif
344+
345+
/* for port/open.c */
346+
#ifndefO_RANDOM
347+
#defineO_RANDOM0x0010/* File access is primarily random */
348+
#defineO_SEQUENTIAL0x0020/* File access is primarily sequential */
349+
#defineO_TEMPORARY0x0040/* Temporary file bit */
350+
#defineO_SHORT_LIVED0x1000/* Temporary storage file, try not to flush */
351+
#define_O_SHORT_LIVEDO_SHORT_LIVED
352+
#endif/* ifndef O_RANDOM */
353+
354+
#endif/* __BORLANDC__ */
355+
338356
#endif

‎src/interfaces/libpq/bcc32.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ OUTFILENAME=blibpq
6262
USERDEFINES=FRONTEND;NDEBUG;WIN32;_WINDOWS
6363

6464
CPP=bcc32.exe
65-
CPP_PROJ = -I$(BCB)\include;..\..\include;..\..\include\port\win32;..\..\include\port\win32_msvc;..\..\port -n"$(INTDIR)" -WD -c -D$(USERDEFINES) -tWM\
65+
CPP_PROJ = -I..\..\include\port\win32_msvc;$(BCB)\include;..\..\include;..\..\include\port\win32;..\..\port -n"$(INTDIR)" -WD -c -D$(USERDEFINES) -tWM\
6666
-a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc
6767

6868
!IFDEF DEBUG

‎src/interfaces/libpq/libpq-int.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-int.h,v 1.139 2009/01/01 17:24:03 momjian Exp $
15+
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-int.h,v 1.140 2009/04/19 22:37:13 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -55,6 +55,9 @@
5555

5656
#ifdefENABLE_SSPI
5757
#defineSECURITY_WIN32
58+
#if defined(WIN32)&& !defined(WIN32_ONLY_COMPILER)
59+
#include<ntsecapi.h>
60+
#endif
5861
#include<security.h>
5962
#undef SECURITY_WIN32
6063

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp