Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
c0285682
Commit
c0285682
authored
Aug 27, 1996
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first pass...move some of the "Port" dependencies to src/include/config.h
parent
672aec6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
39 deletions
+42
-39
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+42
-39
No files found.
src/backend/postmaster/postmaster.c
View file @
c0285682
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.
5 1996/08/14 04:51:34
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.
6 1996/08/27 06:55:28
scrappy Exp $
*
*
* NOTES
* NOTES
*
*
...
@@ -33,43 +33,47 @@
...
@@ -33,43 +33,47 @@
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include "libpq/pqsignal.h"
/* substitute for <signal.h> */
#include "libpq/pqsignal.h"
/* substitute for <signal.h> */
#include "config.h"
#include <string.h>
#include <string.h>
#include <stdlib.h>
#include <stdlib.h>
#ifndef WIN32
#include <unistd.h>
#if !defined(NO_UNISTD_H)
#endif
/* WIN32 */
# include <unistd.h>
#endif
/* !NO_UNISTD_H */
#include <ctype.h>
#include <ctype.h>
#include <sys/types.h>
/* for fd_set stuff */
#include <sys/types.h>
/* for fd_set stuff */
#include <sys/stat.h>
/* for umask */
#include <sys/stat.h>
/* for umask */
#include <sys/time.h>
#include <sys/time.h>
#include <sys/param.h>
/* for MAXHOSTNAMELEN on most */
#include <sys/param.h>
/* for MAXHOSTNAMELEN on most */
#ifdef WIN32
#include <winsock.h>
#if defined(USES_WINSOCK)
#include <limits.h>
# include <winsock.h>
#define MAXINT INT_MAX
# include <limits.h>
# define MAXINT INT_MAX
#else
#else
#include <netdb.h>
/* for MAXHOSTNAMELEN on some */
# include <netdb.h>
/* for MAXHOSTNAMELEN on some */
#ifndef MAXHOSTNAMELEN
/* for MAXHOSTNAMELEN everywhere else */
# ifndef MAXHOSTNAMELEN
/* for MAXHOSTNAMELEN everywhere else */
#include <arpa/nameser.h>
# include <arpa/nameser.h>
#define MAXHOSTNAMELEN MAXDNAME
# define MAXHOSTNAMELEN MAXDNAME
#endif
# endif
# if defined(PORTNAME_BSD44_derived) || \
# if defined(USE_LIMITS_H)
defined(PORTNAME_bsdi) || \
# include <machine/limits.h>
defined(PORTNAME_bsdi_2_1)
# define MAXINT INT_MAX
# include <machine/limits.h>
# define MAXINT INT_MAX
# else
# else
# include <values.h>
# include <values.h>
# endif
/* !PORTNAME_BSD44_derived */
# endif
/* !USE_LIMITS_H */
#include <sys/wait.h>
# include <sys/wait.h>
#endif
/* WIN32 */
#endif
/* USES_WINSOCK */
#include <errno.h>
#include <errno.h>
#include <fcntl.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdio.h>
#if defined(
PORTNAME_aix
)
#if defined(
NEED_SYS_SELECT_H
)
#include <sys/select.h>
#
include <sys/select.h>
#endif
/*
PORTNAME_aix
*/
#endif
/*
NEED_SYS_SELECT_H
*/
#include "storage/ipc.h"
#include "storage/ipc.h"
#include "libpq/libpq.h"
#include "libpq/libpq.h"
...
@@ -81,15 +85,14 @@
...
@@ -81,15 +85,14 @@
#include "storage/proc.h"
#include "storage/proc.h"
#include "utils/elog.h"
#include "utils/elog.h"
#ifdef DBX_VERSION
#if defined(DBX_VERSION)
#define FORK() (0)
# define FORK() (0)
#else
#if defined(PORTNAME_irix5)
/* IRIX 5 does not have vfork() */
#define FORK() fork()
#else
#else
#define FORK() vfork()
# if defined(NO_VFORK)
#endif
# define FORK() fork()
# else
# define FORK() vfork()
# endif
#endif
#endif
/*
/*
...
@@ -140,7 +143,7 @@ static int SendStop = 0;
...
@@ -140,7 +143,7 @@ static int SendStop = 0;
static
int
MultiplexedBackends
=
0
;
static
int
MultiplexedBackends
=
0
;
static
int
MultiplexedBackendPort
;
static
int
MultiplexedBackendPort
;
#if
def HBA
#if
defined(HBA)
static
int
useHostBasedAuth
=
1
;
static
int
useHostBasedAuth
=
1
;
#else
#else
static
int
useHostBasedAuth
=
0
;
static
int
useHostBasedAuth
=
0
;
...
@@ -153,7 +156,7 @@ static void pmdaemonize(void);
...
@@ -153,7 +156,7 @@ static void pmdaemonize(void);
static
int
ConnStartup
(
Port
*
port
);
static
int
ConnStartup
(
Port
*
port
);
static
int
ConnCreate
(
int
serverFd
,
int
*
newFdP
);
static
int
ConnCreate
(
int
serverFd
,
int
*
newFdP
);
static
void
reset_shared
(
short
port
);
static
void
reset_shared
(
short
port
);
#if defined(
PORTNAME_
linux)
#if defined(linux)
static
void
pmdie
(
int
);
static
void
pmdie
(
int
);
static
void
reaper
(
int
);
static
void
reaper
(
int
);
static
void
dumpstatus
(
int
);
static
void
dumpstatus
(
int
);
...
@@ -184,7 +187,7 @@ PostmasterMain(int argc, char *argv[])
...
@@ -184,7 +187,7 @@ PostmasterMain(int argc, char *argv[])
int
status
;
int
status
;
int
silentflag
=
0
;
int
silentflag
=
0
;
char
hostbuf
[
MAXHOSTNAMELEN
];
char
hostbuf
[
MAXHOSTNAMELEN
];
#if
def WIN32
#if
defined(WIN32)
WSADATA
WSAData
;
WSADATA
WSAData
;
#endif
/* WIN32 */
#endif
/* WIN32 */
...
@@ -313,7 +316,7 @@ PostmasterMain(int argc, char *argv[])
...
@@ -313,7 +316,7 @@ PostmasterMain(int argc, char *argv[])
}
}
#if
def WIN32
#if
defined(WIN32)
if
((
status
=
WSAStartup
(
MAKEWORD
(
1
,
1
),
&
WSAData
))
==
0
)
if
((
status
=
WSAStartup
(
MAKEWORD
(
1
,
1
),
&
WSAData
))
==
0
)
(
void
)
printf
(
"%s
\n
Initializing WinSock: %s
\n
"
,
WSAData
.
szDescription
,
WSAData
.
szSystemStatus
);
(
void
)
printf
(
"%s
\n
Initializing WinSock: %s
\n
"
,
WSAData
.
szDescription
,
WSAData
.
szSystemStatus
);
else
else
...
@@ -951,7 +954,7 @@ DoExec(StartupInfo *packet, int portFd)
...
@@ -951,7 +954,7 @@ DoExec(StartupInfo *packet, int portFd)
char
dbbuf
[
ARGV_SIZE
+
1
];
char
dbbuf
[
ARGV_SIZE
+
1
];
int
ac
=
0
;
int
ac
=
0
;
int
i
;
int
i
;
#if
def WIN32
#if
defined(WIN32)
char
win32_args
[(
2
*
ARGV_SIZE
)
+
1
];
char
win32_args
[(
2
*
ARGV_SIZE
)
+
1
];
PROCESS_INFORMATION
piProcInfo
;
PROCESS_INFORMATION
piProcInfo
;
STARTUPINFO
siStartInfo
;
STARTUPINFO
siStartInfo
;
...
@@ -984,7 +987,7 @@ DoExec(StartupInfo *packet, int portFd)
...
@@ -984,7 +987,7 @@ DoExec(StartupInfo *packet, int portFd)
if
(
packet
->
tty
[
0
])
{
if
(
packet
->
tty
[
0
])
{
(
void
)
strncpy
(
ttybuf
,
packet
->
tty
,
ARGV_SIZE
);
(
void
)
strncpy
(
ttybuf
,
packet
->
tty
,
ARGV_SIZE
);
av
[
ac
++
]
=
"-o"
;
av
[
ac
++
]
=
"-o"
;
#if
def WIN32
#if
defined(WIN32)
/* BIG HACK - The front end is passing "/dev/null" here which
/* BIG HACK - The front end is passing "/dev/null" here which
** causes new backends to fail. So, as a very special case,
** causes new backends to fail. So, as a very special case,
** use a real NT filename.
** use a real NT filename.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment