Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 541757f

Browse files
committed
psql: Remove one use of HAVE_UNIX_SOCKETS
This use was not protecting any unportable code, it was just omitting the code because it wouldn't be used. Remove the use to reduce code complexity a bit. Discussion: https://www.postgresql.org/message-id/flat/54bde68c-d134-4eb8-5bd3-8af33b72a010@2ndquadrant.com
1 parent b691c18 commit 541757f

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/bin/psql/prompt.c

-7
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
#include <win32.h>
1313
#endif
1414

15-
#ifdef HAVE_UNIX_SOCKETS
16-
#include <unistd.h>
17-
#include <netdb.h>
18-
#endif
19-
2015
#include "common.h"
2116
#include "common/string.h"
2217
#include "input.h"
@@ -147,7 +142,6 @@ get_prompt(promptStatus_t status, ConditionalStack cstack)
147142
if (*p == 'm')
148143
buf[strcspn(buf, ".")] = '\0';
149144
}
150-
#ifdef HAVE_UNIX_SOCKETS
151145
/* UNIX socket */
152146
else
153147
{
@@ -158,7 +152,6 @@ get_prompt(promptStatus_t status, ConditionalStack cstack)
158152
else
159153
snprintf(buf, sizeof(buf), "[local:%s]", host);
160154
}
161-
#endif
162155
}
163156
break;
164157
/* DB server port number */

0 commit comments

Comments
 (0)