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
9b3d66ec
Commit
9b3d66ec
authored
Aug 20, 2000
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce HAVE_UNIX_SOCKETS symbol to replace repeatedly listing all the
unsupported platforms.
parent
4b8f1bcb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
21 deletions
+28
-21
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+8
-10
src/bin/psql/prompt.c
src/bin/psql/prompt.c
+9
-8
src/include/config.h.in
src/include/config.h.in
+9
-1
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-connect.c
+2
-2
No files found.
src/backend/postmaster/postmaster.c
View file @
9b3d66ec
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.1
59 2000/08/07 00:51:30 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.1
60 2000/08/20 10:55:33 petere
Exp $
*
* NOTES
*
...
...
@@ -169,14 +169,12 @@ static volatile bool got_SIGHUP = false;
*/
static
int
ServerSock_INET
=
INVALID_SOCK
;
/* stream socket server */
#if
!defined(__CYGWIN32__) && !defined(__QNX__)
#if
def HAVE_UNIX_SOCKETS
static
int
ServerSock_UNIX
=
INVALID_SOCK
;
/* stream socket server */
#endif
#ifdef USE_SSL
static
SSL_CTX
*
SSL_context
=
NULL
;
/* Global SSL context */
#endif
/*
...
...
@@ -589,7 +587,7 @@ PostmasterMain(int argc, char *argv[])
}
}
#if
!defined(__CYGWIN32__) && !defined(__QNX__)
#if
def HAVE_UNIX_SOCKETS
status
=
StreamServerPort
(
AF_UNIX
,
(
unsigned
short
)
PostPortName
,
&
ServerSock_UNIX
);
if
(
status
!=
STATUS_OK
)
{
...
...
@@ -856,7 +854,7 @@ ServerLoop(void)
/* new connection pending on our well-known port's socket */
#if
!defined(__CYGWIN32__) && !defined(__QNX__)
#if
def HAVE_UNIX_SOCKETS
if
(
ServerSock_UNIX
!=
INVALID_SOCK
&&
FD_ISSET
(
ServerSock_UNIX
,
&
rmask
)
&&
(
port
=
ConnCreate
(
ServerSock_UNIX
))
!=
NULL
)
...
...
@@ -1015,7 +1013,7 @@ initMasks(fd_set *rmask, fd_set *wmask)
FD_ZERO
(
rmask
);
FD_ZERO
(
wmask
);
#if
!defined(__CYGWIN32__) && !defined(__QNX__)
#if
def HAVE_UNIX_SOCKETS
if
(
ServerSock_UNIX
!=
INVALID_SOCK
)
{
FD_SET
(
ServerSock_UNIX
,
rmask
);
...
...
@@ -1832,7 +1830,7 @@ DoBackend(Port *port)
if
(
NetServer
)
StreamClose
(
ServerSock_INET
);
ServerSock_INET
=
INVALID_SOCK
;
#if
!defined(__CYGWIN32__) && !defined(__QNX__)
#if
def HAVE_UNIX_SOCKETS
StreamClose
(
ServerSock_UNIX
);
ServerSock_UNIX
=
INVALID_SOCK
;
#endif
...
...
@@ -1962,7 +1960,7 @@ ExitPostmaster(int status)
if
(
ServerSock_INET
!=
INVALID_SOCK
)
StreamClose
(
ServerSock_INET
);
ServerSock_INET
=
INVALID_SOCK
;
#if
!defined(__CYGWIN32__) && !defined(__QNX__)
#if
def HAVE_UNIX_SOCKETS
if
(
ServerSock_UNIX
!=
INVALID_SOCK
)
StreamClose
(
ServerSock_UNIX
);
ServerSock_UNIX
=
INVALID_SOCK
;
...
...
@@ -2134,7 +2132,7 @@ SSDataBase(bool startup)
if
(
NetServer
)
StreamClose
(
ServerSock_INET
);
ServerSock_INET
=
INVALID_SOCK
;
#if
!defined(__CYGWIN32__) && !defined(__QNX__)
#if
def HAVE_UNIX_SOCKETS
StreamClose
(
ServerSock_UNIX
);
ServerSock_UNIX
=
INVALID_SOCK
;
#endif
...
...
src/bin/psql/prompt.c
View file @
9b3d66ec
...
...
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/prompt.c,v 1.1
2 2000/04/12 17:16:23 momjian
Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/prompt.c,v 1.1
3 2000/08/20 10:55:34 petere
Exp $
*/
#include "postgres.h"
#include "prompt.h"
...
...
@@ -19,9 +19,9 @@
#include <win32.h>
#endif
#if
!defined(WIN32) && !defined(__CYGWIN32__) && !defined(__QNX__)
#include <unistd.h>
#include <netdb.h>
#if
def HAVE_UNIX_SOCKETS
#
include <unistd.h>
#
include <netdb.h>
#endif
/*--------------------------
...
...
@@ -64,7 +64,7 @@
/*
* We need hostname information, only if connection is via UNIX socket
*/
#if
!defined(WIN32) && !defined(__CYGWIN32__) && !defined(__QNX__)
#if
def HAVE_UNIX_SOCKETS
#define DOMAINNAME 1
#define HOSTNAME 2
...
...
@@ -104,7 +104,8 @@ localhost(int type, char *buf, int siz)
return
buf
;
}
#endif
#endif
/* HAVE_UNIX_SOCKETS */
char
*
get_prompt
(
promptStatus_t
status
)
...
...
@@ -173,7 +174,7 @@ get_prompt(promptStatus_t status)
buf
[
strcspn
(
buf
,
"."
)]
=
'\0'
;
}
/* UNIX socket */
#if
!defined(WIN32) && !defined(__CYGWIN32__) && !defined(__QNX__)
#if
def HAVE_UNIX_SOCKETS
else
{
if
(
*
p
==
'm'
)
...
...
@@ -181,7 +182,7 @@ get_prompt(promptStatus_t status)
else
localhost
(
DOMAINNAME
,
buf
,
MAX_PROMPT_SIZE
);
}
#endif
#endif
/* HAVE_UNIX_SOCKETS */
}
break
;
/* DB server port number */
...
...
src/include/config.h.in
View file @
9b3d66ec
...
...
@@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
* $Id: config.h.in,v 1.13
0 2000/08/07 20:15:44 tgl
Exp $
* $Id: config.h.in,v 1.13
1 2000/08/20 10:55:34 petere
Exp $
*/
#ifndef CONFIG_H
...
...
@@ -223,6 +223,14 @@
*/
#define BITSPERBYTE 8
/*
* Define this is your operating system kernel supports AF_UNIX family
* sockets.
*/
#if !defined(__CYGWIN32__) && !defined(__QNX__)
# define HAVE_UNIX_SOCKETS 1
#endif
/*
*------------------------------------------------------------------------
* These hand-configurable symbols are for enabling debugging code,
...
...
src/interfaces/libpq/fe-connect.c
View file @
9b3d66ec
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.13
1 2000/07/09 13:14:17
petere Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.13
2 2000/08/20 10:55:35
petere Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -738,7 +738,7 @@ connectDBStart(PGconn *conn)
conn
->
raddr
.
in
.
sin_port
=
htons
((
unsigned
short
)
(
portno
));
conn
->
raddr_len
=
sizeof
(
struct
sockaddr_in
);
}
#if
!defined(WIN32) && !defined(__CYGWIN32__)
#if
def HAVE_UNIX_SOCKETS
else
conn
->
raddr_len
=
UNIXSOCK_PATH
(
conn
->
raddr
.
un
,
portno
);
#endif
...
...
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