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 | |
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')
-rw-r--r-- | src/backend/port/dynloader/hpux.c | 2 | ||||
-rw-r--r-- | src/backend/port/sysv_sema.c | 12 | ||||
-rw-r--r-- | src/backend/port/sysv_shmem.c | 22 | ||||
-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 |
8 files changed, 34 insertions, 34 deletions
diff --git a/src/backend/port/dynloader/hpux.c b/src/backend/port/dynloader/hpux.c index c7f93d2d4a..5a0e40146d 100644 --- a/src/backend/port/dynloader/hpux.c +++ b/src/backend/port/dynloader/hpux.c @@ -34,7 +34,7 @@ pg_dlopen(char *filename) * call the library! */ shl_t handle = shl_load(filename, - BIND_IMMEDIATE | BIND_VERBOSE | DYNAMIC_PATH, + BIND_IMMEDIATE | BIND_VERBOSE | DYNAMIC_PATH, 0L); return (void *) handle; diff --git a/src/backend/port/sysv_sema.c b/src/backend/port/sysv_sema.c index a68b1f4aea..d4202feb56 100644 --- a/src/backend/port/sysv_sema.c +++ b/src/backend/port/sysv_sema.c @@ -126,12 +126,12 @@ InternalIpcSemaphoreCreate(IpcSemaphoreKey semKey, int numSems) IPC_CREAT | IPC_EXCL | IPCProtection), (saved_errno == ENOSPC) ? errhint("This error does *not* mean that you have run out of disk space. " - "It occurs when either the system limit for the maximum number of " - "semaphore sets (SEMMNI), or the system wide maximum number of " - "semaphores (SEMMNS), would be exceeded. You need to raise the " - "respective kernel parameter. Alternatively, reduce PostgreSQL's " + "It occurs when either the system limit for the maximum number of " + "semaphore sets (SEMMNI), or the system wide maximum number of " + "semaphores (SEMMNS), would be exceeded. You need to raise the " + "respective kernel parameter. Alternatively, reduce PostgreSQL's " "consumption of semaphores by reducing its max_connections parameter.\n" - "The PostgreSQL documentation contains more information about " + "The PostgreSQL documentation contains more information about " "configuring your system for PostgreSQL.") : 0)); } @@ -156,7 +156,7 @@ IpcSemaphoreInitialize(IpcSemaphoreId semId, int semNum, int value) semId, semNum, value), (saved_errno == ERANGE) ? errhint("You possibly need to raise your kernel's SEMVMX value to be at least " - "%d. Look into the PostgreSQL documentation for details.", + "%d. Look into the PostgreSQL documentation for details.", value) : 0)); } } diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c index 042635afbd..273d1313b0 100644 --- a/src/backend/port/sysv_shmem.c +++ b/src/backend/port/sysv_shmem.c @@ -193,29 +193,29 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size) errno = shmget_errno; ereport(FATAL, (errmsg("could not create shared memory segment: %m"), - errdetail("Failed system call was shmget(key=%lu, size=%zu, 0%o).", - (unsigned long) memKey, size, - IPC_CREAT | IPC_EXCL | IPCProtection), + errdetail("Failed system call was shmget(key=%lu, size=%zu, 0%o).", + (unsigned long) memKey, size, + IPC_CREAT | IPC_EXCL | IPCProtection), (shmget_errno == EINVAL) ? errhint("This error usually means that PostgreSQL's request for a shared memory " - "segment exceeded your kernel's SHMMAX parameter, or possibly that " + "segment exceeded your kernel's SHMMAX parameter, or possibly that " "it is less than " "your kernel's SHMMIN parameter.\n" - "The PostgreSQL documentation contains more information about shared " + "The PostgreSQL documentation contains more information about shared " "memory configuration.") : 0, (shmget_errno == ENOMEM) ? errhint("This error usually means that PostgreSQL's request for a shared " "memory segment exceeded your kernel's SHMALL parameter. You might need " "to reconfigure the kernel with larger SHMALL.\n" - "The PostgreSQL documentation contains more information about shared " + "The PostgreSQL documentation contains more information about shared " "memory configuration.") : 0, (shmget_errno == ENOSPC) ? errhint("This error does *not* mean that you have run out of disk space. " "It occurs either if all available shared memory IDs have been taken, " "in which case you need to raise the SHMMNI parameter in your kernel, " - "or because the system's overall limit for shared memory has been " + "or because the system's overall limit for shared memory has been " "reached.\n" - "The PostgreSQL documentation contains more information about shared " + "The PostgreSQL documentation contains more information about shared " "memory configuration.") : 0)); } @@ -504,10 +504,10 @@ CreateAnonymousSegment(Size *size) (errmsg("could not map anonymous shared memory: %m"), (mmap_errno == ENOMEM) ? errhint("This error usually means that PostgreSQL's request " - "for a shared memory segment exceeded available memory, " - "swap space, or huge pages. To reduce the request size " + "for a shared memory segment exceeded available memory, " + "swap space, or huge pages. To reduce the request size " "(currently %zu bytes), reduce PostgreSQL's shared " - "memory usage, perhaps by reducing shared_buffers or " + "memory usage, perhaps by reducing shared_buffers or " "max_connections.", *size) : 0)); } 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 */ |