diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-06-21 15:35:54 -0400 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-06-21 15:35:54 -0400 |
| commit | 382ceffdf7f620d8f2d50e451b4167d291ae2348 (patch) | |
| tree | f558251492f2c6f86e3566f7a82f9d00509122c2 /src/backend/port/win32 | |
| parent | c7b8998ebbf310a156aa38022555a24d98fdbfb4 (diff) | |
| download | postgresql-382ceffdf7f620d8f2d50e451b4167d291ae2348.tar.gz | |
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they
flow past the right margin.
By default, BSD indent lines up statement continuation lines that are
within parentheses so that they start just to the right of the preceding
left parenthesis. However, traditionally, if that resulted in the
continuation line extending to the right of the desired right margin,
then indent would push it left just far enough to not overrun the margin,
if it could do so without making the continuation line start to the left of
the current statement indent. That makes for a weird mix of indentations
unless one has been completely rigid about never violating the 80-column
limit.
This behavior has been pretty universally panned by Postgres developers.
Hence, disable it with indent's new -lpl switch, so that parenthesized
lines are always lined up with the preceding left paren.
This patch is much less interesting than the first round of indent
changes, but also bulkier, so I thought it best to separate the effects.
Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'src/backend/port/win32')
| -rw-r--r-- | src/backend/port/win32/crashdump.c | 6 | ||||
| -rw-r--r-- | src/backend/port/win32/mingwcompat.c | 4 | ||||
| -rw-r--r-- | src/backend/port/win32/signal.c | 12 | ||||
| -rw-r--r-- | src/backend/port/win32/socket.c | 2 | ||||
| -rw-r--r-- | src/backend/port/win32/timer.c | 8 |
5 files changed, 16 insertions, 16 deletions
diff --git a/src/backend/port/win32/crashdump.c b/src/backend/port/win32/crashdump.c index c97cb9181e..f06dfd1987 100644 --- a/src/backend/port/win32/crashdump.c +++ b/src/backend/port/win32/crashdump.c @@ -71,9 +71,9 @@ */ typedef BOOL (WINAPI * MINIDUMPWRITEDUMP) (HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam + CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, + CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, + CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam ); diff --git a/src/backend/port/win32/mingwcompat.c b/src/backend/port/win32/mingwcompat.c index ca63c6ee27..e02b41711e 100644 --- a/src/backend/port/win32/mingwcompat.c +++ b/src/backend/port/win32/mingwcompat.c @@ -42,8 +42,8 @@ LoadKernel32() kernel32 = LoadLibraryEx("kernel32.dll", NULL, 0); if (kernel32 == NULL) ereport(FATAL, - (errmsg_internal("could not load kernel32.dll: error code %lu", - GetLastError()))); + (errmsg_internal("could not load kernel32.dll: error code %lu", + GetLastError()))); } diff --git a/src/backend/port/win32/signal.c b/src/backend/port/win32/signal.c index ebbd434b9a..0fd993e3f3 100644 --- a/src/backend/port/win32/signal.c +++ b/src/backend/port/win32/signal.c @@ -186,7 +186,7 @@ pgwin32_create_signal_listener(pid_t pid) snprintf(pipename, sizeof(pipename), "\\\\.\\pipe\\pgsignal_%u", (int) pid); pipe = CreateNamedPipe(pipename, PIPE_ACCESS_DUPLEX, - PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, + PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, 16, 16, 1000, NULL); if (pipe == INVALID_HANDLE_VALUE) @@ -266,8 +266,8 @@ pg_signal_thread(LPVOID param) if (pipe == INVALID_HANDLE_VALUE) { pipe = CreateNamedPipe(pipename, PIPE_ACCESS_DUPLEX, - PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, - PIPE_UNLIMITED_INSTANCES, 16, 16, 1000, NULL); + PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, + PIPE_UNLIMITED_INSTANCES, 16, 16, 1000, NULL); if (pipe == INVALID_HANDLE_VALUE) { @@ -293,8 +293,8 @@ pg_signal_thread(LPVOID param) * window of time where we will miss incoming requests. */ newpipe = CreateNamedPipe(pipename, PIPE_ACCESS_DUPLEX, - PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, - PIPE_UNLIMITED_INSTANCES, 16, 16, 1000, NULL); + PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, + PIPE_UNLIMITED_INSTANCES, 16, 16, 1000, NULL); if (newpipe == INVALID_HANDLE_VALUE) { /* @@ -311,7 +311,7 @@ pg_signal_thread(LPVOID param) */ } hThread = CreateThread(NULL, 0, - (LPTHREAD_START_ROUTINE) pg_signal_dispatch_thread, + (LPTHREAD_START_ROUTINE) pg_signal_dispatch_thread, (LPVOID) pipe, 0, NULL); if (hThread == INVALID_HANDLE_VALUE) write_stderr("could not create signal dispatch thread: error code %lu\n", diff --git a/src/backend/port/win32/socket.c b/src/backend/port/win32/socket.c index 535b9a0c67..ba8b863d82 100644 --- a/src/backend/port/win32/socket.c +++ b/src/backend/port/win32/socket.c @@ -426,7 +426,7 @@ pgwin32_recv(SOCKET s, char *buf, int len, int f) pg_usleep(10000); } ereport(NOTICE, - (errmsg_internal("could not read from ready socket (after retries)"))); + (errmsg_internal("could not read from ready socket (after retries)"))); errno = EWOULDBLOCK; return -1; } diff --git a/src/backend/port/win32/timer.c b/src/backend/port/win32/timer.c index f1aa0f3a16..f0a45f4339 100644 --- a/src/backend/port/win32/timer.c +++ b/src/backend/port/win32/timer.c @@ -95,8 +95,8 @@ setitimer(int which, const struct itimerval *value, struct itimerval *ovalue) timerCommArea.event = CreateEvent(NULL, TRUE, FALSE, NULL); if (timerCommArea.event == NULL) ereport(FATAL, - (errmsg_internal("could not create timer event: error code %lu", - GetLastError()))); + (errmsg_internal("could not create timer event: error code %lu", + GetLastError()))); MemSet(&timerCommArea.value, 0, sizeof(struct itimerval)); @@ -105,8 +105,8 @@ setitimer(int which, const struct itimerval *value, struct itimerval *ovalue) timerThreadHandle = CreateThread(NULL, 0, pg_timer_thread, NULL, 0, NULL); if (timerThreadHandle == INVALID_HANDLE_VALUE) ereport(FATAL, - (errmsg_internal("could not create timer thread: error code %lu", - GetLastError()))); + (errmsg_internal("could not create timer thread: error code %lu", + GetLastError()))); } /* Request the timer thread to change settings */ |
