Skip to content

Commit

Permalink
psql: Remove one use of HAVE_UNIX_SOCKETS
Browse files Browse the repository at this point in the history
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/[email protected]
  • Loading branch information
petere committed Feb 10, 2020
1 parent b691c18 commit 541757f
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/bin/psql/prompt.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
#include <win32.h>
#endif

#ifdef HAVE_UNIX_SOCKETS
#include <unistd.h>
#include <netdb.h>
#endif

#include "common.h"
#include "common/string.h"
#include "input.h"
Expand Down Expand Up @@ -147,7 +142,6 @@ get_prompt(promptStatus_t status, ConditionalStack cstack)
if (*p == 'm')
buf[strcspn(buf, ".")] = '\0';
}
#ifdef HAVE_UNIX_SOCKETS
/* UNIX socket */
else
{
Expand All @@ -158,7 +152,6 @@ get_prompt(promptStatus_t status, ConditionalStack cstack)
else
snprintf(buf, sizeof(buf), "[local:%s]", host);
}
#endif
}
break;
/* DB server port number */
Expand Down

0 comments on commit 541757f

Please sign in to comment.