mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
pgindent run for 9.5
This commit is contained in:
@@ -38,14 +38,14 @@ static const unsigned __int64 epoch = UINT64CONST(116444736000000000);
|
||||
* January 1, 1601 (UTC).
|
||||
*/
|
||||
#define FILETIME_UNITS_PER_SEC 10000000L
|
||||
#define FILETIME_UNITS_PER_USEC 10
|
||||
#define FILETIME_UNITS_PER_USEC 10
|
||||
|
||||
/*
|
||||
* Both GetSystemTimeAsFileTime and GetSystemTimePreciseAsFileTime share a
|
||||
* signature, so we can just store a pointer to whichever we find. This
|
||||
* is the pointer's type.
|
||||
*/
|
||||
typedef VOID (WINAPI *PgGetSystemTimeFn)(LPFILETIME);
|
||||
typedef VOID(WINAPI * PgGetSystemTimeFn) (LPFILETIME);
|
||||
|
||||
/* One-time initializer function, must match that signature. */
|
||||
static void WINAPI init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime);
|
||||
@@ -71,12 +71,12 @@ init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime)
|
||||
*
|
||||
* While we could look up the Windows version and skip this on Windows
|
||||
* versions below Windows 8 / Windows Server 2012 there isn't much point,
|
||||
* and determining the windows version is its self somewhat Windows version
|
||||
* and development SDK specific...
|
||||
* and determining the windows version is its self somewhat Windows
|
||||
* version and development SDK specific...
|
||||
*/
|
||||
pg_get_system_time = (PgGetSystemTimeFn) GetProcAddress(
|
||||
GetModuleHandle(TEXT("kernel32.dll")),
|
||||
"GetSystemTimePreciseAsFileTime");
|
||||
GetModuleHandle(TEXT("kernel32.dll")),
|
||||
"GetSystemTimePreciseAsFileTime");
|
||||
if (pg_get_system_time == NULL)
|
||||
{
|
||||
/*
|
||||
@@ -84,15 +84,15 @@ init_gettimeofday(LPFILETIME lpSystemTimeAsFileTime)
|
||||
* the function isn't present. No other error should occur.
|
||||
*
|
||||
* We can't report an error here because this might be running in
|
||||
* frontend code; and even if we're in the backend, it's too early
|
||||
* to elog(...) if we get some unexpected error. Also, it's not a
|
||||
* frontend code; and even if we're in the backend, it's too early to
|
||||
* elog(...) if we get some unexpected error. Also, it's not a
|
||||
* serious problem, so just silently fall back to
|
||||
* GetSystemTimeAsFileTime irrespective of why the failure occurred.
|
||||
*/
|
||||
pg_get_system_time = &GetSystemTimeAsFileTime;
|
||||
}
|
||||
|
||||
(*pg_get_system_time)(lpSystemTimeAsFileTime);
|
||||
(*pg_get_system_time) (lpSystemTimeAsFileTime);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -107,13 +107,13 @@ gettimeofday(struct timeval * tp, struct timezone * tzp)
|
||||
FILETIME file_time;
|
||||
ULARGE_INTEGER ularge;
|
||||
|
||||
(*pg_get_system_time)(&file_time);
|
||||
(*pg_get_system_time) (&file_time);
|
||||
ularge.LowPart = file_time.dwLowDateTime;
|
||||
ularge.HighPart = file_time.dwHighDateTime;
|
||||
|
||||
tp->tv_sec = (long) ((ularge.QuadPart - epoch) / FILETIME_UNITS_PER_SEC);
|
||||
tp->tv_usec = (long) (((ularge.QuadPart - epoch) % FILETIME_UNITS_PER_SEC)
|
||||
/ FILETIME_UNITS_PER_USEC);
|
||||
/ FILETIME_UNITS_PER_USEC);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ pg_crc32c_sse42_available(void)
|
||||
#error cpuid instruction not available
|
||||
#endif
|
||||
|
||||
return (exx[2] & (1 << 20)) != 0; /* SSE 4.2 */
|
||||
return (exx[2] & (1 << 20)) != 0; /* SSE 4.2 */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -60,4 +60,4 @@ pg_comp_crc32c_choose(pg_crc32c crc, const void *data, size_t len)
|
||||
return pg_comp_crc32c(crc, data, len);
|
||||
}
|
||||
|
||||
pg_crc32c (*pg_comp_crc32c) (pg_crc32c crc, const void *data, size_t len) = pg_comp_crc32c_choose;
|
||||
pg_crc32c (*pg_comp_crc32c) (pg_crc32c crc, const void *data, size_t len) = pg_comp_crc32c_choose;
|
||||
|
@@ -45,6 +45,7 @@ pg_comp_crc32c_sse42(pg_crc32c crc, const void *data, size_t len)
|
||||
p += 4;
|
||||
}
|
||||
#else
|
||||
|
||||
/*
|
||||
* Process four bytes at a time. (The eight byte instruction is not
|
||||
* available on the 32-bit x86 architecture).
|
||||
@@ -54,7 +55,7 @@ pg_comp_crc32c_sse42(pg_crc32c crc, const void *data, size_t len)
|
||||
crc = _mm_crc32_u32(crc, *((const unsigned int *) p));
|
||||
p += 4;
|
||||
}
|
||||
#endif /* __x86_64__ */
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
/* Process any remaining bytes one at a time. */
|
||||
while (p < pend)
|
||||
|
@@ -40,9 +40,9 @@ struct locale_map
|
||||
{
|
||||
/*
|
||||
* String in locale name to replace. Can be a single string (end is NULL),
|
||||
* or separate start and end strings. If two strings are given, the
|
||||
* locale name must contain both of them, and everything between them
|
||||
* is replaced. This is used for a poor-man's regexp search, allowing
|
||||
* or separate start and end strings. If two strings are given, the locale
|
||||
* name must contain both of them, and everything between them is
|
||||
* replaced. This is used for a poor-man's regexp search, allowing
|
||||
* replacement of "start.*end".
|
||||
*/
|
||||
const char *locale_name_start;
|
||||
@@ -104,7 +104,7 @@ static const struct locale_map locale_map_result[] = {
|
||||
#define MAX_LOCALE_NAME_LEN 100
|
||||
|
||||
static const char *
|
||||
map_locale(const struct locale_map *map, const char *locale)
|
||||
map_locale(const struct locale_map * map, const char *locale)
|
||||
{
|
||||
static char aliasbuf[MAX_LOCALE_NAME_LEN];
|
||||
int i;
|
||||
|
Reference in New Issue
Block a user