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

Commitc028568

Browse files
committed
first pass...move some of the "Port" dependencies to src/include/config.h
1 parent672aec6 commitc028568

File tree

1 file changed

+42
-39
lines changed

1 file changed

+42
-39
lines changed

‎src/backend/postmaster/postmaster.c‎

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.5 1996/08/14 04:51:34 scrappy Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.6 1996/08/27 06:55:28 scrappy Exp $
1414
*
1515
* NOTES
1616
*
@@ -33,43 +33,47 @@
3333
*-------------------------------------------------------------------------
3434
*/
3535
#include"libpq/pqsignal.h"/* substitute for <signal.h> */
36+
#include"config.h"
37+
3638
#include<string.h>
3739
#include<stdlib.h>
38-
#ifndefWIN32
39-
#include<unistd.h>
40-
#endif/* WIN32 */
40+
41+
#if !defined(NO_UNISTD_H)
42+
# include<unistd.h>
43+
#endif/* !NO_UNISTD_H */
44+
4145
#include<ctype.h>
4246
#include<sys/types.h>/* for fd_set stuff */
4347
#include<sys/stat.h>/* for umask */
4448
#include<sys/time.h>
4549
#include<sys/param.h>/* for MAXHOSTNAMELEN on most */
46-
#ifdefWIN32
47-
#include<winsock.h>
48-
#include<limits.h>
49-
#defineMAXINT INT_MAX
50+
51+
#if defined(USES_WINSOCK)
52+
# include<winsock.h>
53+
# include<limits.h>
54+
# defineMAXINT INT_MAX
5055
#else
51-
#include<netdb.h>/* for MAXHOSTNAMELEN on some */
52-
#ifndefMAXHOSTNAMELEN/* for MAXHOSTNAMELEN everywhere else */
53-
#include<arpa/nameser.h>
54-
#defineMAXHOSTNAMELENMAXDNAME
55-
#endif
56-
# if defined(PORTNAME_BSD44_derived)|| \
57-
defined(PORTNAME_bsdi)|| \
58-
defined(PORTNAME_bsdi_2_1)
59-
# include<machine/limits.h>
60-
# defineMAXINTINT_MAX
56+
# include<netdb.h>/* for MAXHOSTNAMELEN on some */
57+
# ifndefMAXHOSTNAMELEN/* for MAXHOSTNAMELEN everywhere else */
58+
# include<arpa/nameser.h>
59+
# defineMAXHOSTNAMELENMAXDNAME
60+
# endif
61+
# if defined(USE_LIMITS_H)
62+
# include<machine/limits.h>
63+
# defineMAXINTINT_MAX
6164
# else
62-
# include<values.h>
63-
# endif/* !PORTNAME_BSD44_derived */
64-
#include<sys/wait.h>
65-
#endif/* WIN32 */
65+
# include<values.h>
66+
# endif/* !USE_LIMITS_H */
67+
# include<sys/wait.h>
68+
#endif/* USES_WINSOCK */
69+
6670
#include<errno.h>
6771
#include<fcntl.h>
6872
#include<stdio.h>
6973

70-
#if defined(PORTNAME_aix)
71-
#include<sys/select.h>
72-
#endif/*PORTNAME_aix */
74+
#if defined(NEED_SYS_SELECT_H)
75+
#include<sys/select.h>
76+
#endif/*NEED_SYS_SELECT_H */
7377

7478
#include"storage/ipc.h"
7579
#include"libpq/libpq.h"
@@ -81,15 +85,14 @@
8185
#include"storage/proc.h"
8286
#include"utils/elog.h"
8387

84-
#ifdefDBX_VERSION
85-
#defineFORK() (0)
86-
#else
87-
#if defined(PORTNAME_irix5)
88-
/* IRIX 5 does not have vfork() */
89-
#defineFORK() fork()
88+
#if defined(DBX_VERSION)
89+
# defineFORK() (0)
9090
#else
91-
#defineFORK() vfork()
92-
#endif
91+
# if defined(NO_VFORK)
92+
# defineFORK() fork()
93+
# else
94+
# defineFORK() vfork()
95+
# endif
9396
#endif
9497

9598
/*
@@ -140,7 +143,7 @@ static intSendStop = 0;
140143
staticintMultiplexedBackends=0;
141144
staticintMultiplexedBackendPort;
142145

143-
#ifdefHBA
146+
#if defined(HBA)
144147
staticintuseHostBasedAuth=1;
145148
#else
146149
staticintuseHostBasedAuth=0;
@@ -153,7 +156,7 @@ static void pmdaemonize(void);
153156
staticintConnStartup(Port*port);
154157
staticintConnCreate(intserverFd,int*newFdP);
155158
staticvoidreset_shared(shortport);
156-
#if defined(PORTNAME_linux)
159+
#if defined(linux)
157160
staticvoidpmdie(int);
158161
staticvoidreaper(int);
159162
staticvoiddumpstatus(int);
@@ -184,7 +187,7 @@ PostmasterMain(int argc, char *argv[])
184187
intstatus;
185188
intsilentflag=0;
186189
charhostbuf[MAXHOSTNAMELEN];
187-
#ifdefWIN32
190+
#if defined(WIN32)
188191
WSADATAWSAData;
189192
#endif/* WIN32 */
190193

@@ -313,7 +316,7 @@ PostmasterMain(int argc, char *argv[])
313316
}
314317

315318

316-
#ifdefWIN32
319+
#if defined(WIN32)
317320
if ((status=WSAStartup(MAKEWORD(1,1),&WSAData))==0)
318321
(void)printf("%s\nInitializing WinSock: %s\n",WSAData.szDescription,WSAData.szSystemStatus);
319322
else
@@ -951,7 +954,7 @@ DoExec(StartupInfo *packet, int portFd)
951954
chardbbuf[ARGV_SIZE+1];
952955
intac=0;
953956
inti;
954-
#ifdefWIN32
957+
#if defined(WIN32)
955958
charwin32_args[(2*ARGV_SIZE)+1];
956959
PROCESS_INFORMATIONpiProcInfo;
957960
STARTUPINFOsiStartInfo;
@@ -984,7 +987,7 @@ DoExec(StartupInfo *packet, int portFd)
984987
if (packet->tty[0]) {
985988
(void)strncpy(ttybuf,packet->tty,ARGV_SIZE);
986989
av[ac++]="-o";
987-
#ifdefWIN32
990+
#if defined(WIN32)
988991
/* BIG HACK - The front end is passing "/dev/null" here which
989992
** causes new backends to fail. So, as a very special case,
990993
** use a real NT filename.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp