1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +03:00

Pgindent run for 8.0.

This commit is contained in:
Bruce Momjian
2004-08-29 05:07:03 +00:00
parent 90cb9c3051
commit b6b71b85bc
527 changed files with 20550 additions and 18283 deletions

View File

@@ -29,7 +29,7 @@
#endif
#endif
#define WAL_FILE_SIZE (16 * 1024 * 1024)
#define WAL_FILE_SIZE (16 * 1024 * 1024)
void die(char *str);
void print_elapse(struct timeval start_t, struct timeval elapse_t);
@@ -41,20 +41,20 @@ main(int argc, char *argv[])
struct timeval elapse_t;
int tmpfile,
i,
loops=1000;
loops = 1000;
char *strout = (char *) malloc(WAL_FILE_SIZE);
char *filename = FSYNC_FILENAME;
if (argc > 2 && strcmp(argv[1],"-f") == 0)
if (argc > 2 && strcmp(argv[1], "-f") == 0)
{
filename = argv[2];
argv += 2;
argc -= 2;
}
if (argc > 1)
loops = atoi(argv[1]);
loops = atoi(argv[1]);
for (i = 0; i < WAL_FILE_SIZE; i++)
strout[i] = 'a';

View File

@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.32 2004/08/29 04:13:13 momjian Exp $
* $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.33 2004/08/29 05:07:03 momjian Exp $
*
* This program tests to see if your standard libc functions use
* pthread_setspecific()/pthread_getspecific() to be thread-safe.
@@ -64,8 +64,8 @@ main(int argc, char *argv[])
void func_call_1(void);
void func_call_2(void);
#define TEMP_FILENAME_1 "/tmp/thread_test.1.XXXXXX"
#define TEMP_FILENAME_2 "/tmp/thread_test.2.XXXXXX"
#define TEMP_FILENAME_1 "/tmp/thread_test.1.XXXXXX"
#define TEMP_FILENAME_2 "/tmp/thread_test.2.XXXXXX"
char *temp_filename_1;
char *temp_filename_2;
@@ -105,7 +105,7 @@ main(int argc, char *argv[])
pthread_t thread1,
thread2;
int fd;
if (argc > 1)
{
fprintf(stderr, "Usage: %s\n", argv[0]);
@@ -117,7 +117,7 @@ main(int argc, char *argv[])
close(1);
dup(5);
#endif
/* Make temp filenames, might not have strdup() */
temp_filename_1 = malloc(strlen(TEMP_FILENAME_1) + 1);
strcpy(temp_filename_1, TEMP_FILENAME_1);
@@ -128,7 +128,7 @@ main(int argc, char *argv[])
strcpy(temp_filename_2, TEMP_FILENAME_2);
fd = mkstemp(temp_filename_2);
close(fd);
#if !defined(HAVE_GETADDRINFO) && !defined(HAVE_GETHOSTBYNAME_R)
if (gethostname(myhostname, MAXHOSTNAMELEN) != 0)
{
@@ -363,4 +363,5 @@ func_call_2(void)
pthread_mutex_lock(&init_mutex); /* wait for parent to test */
pthread_mutex_unlock(&init_mutex);
}
#endif /* !ENABLE_THREAD_SAFETY && !IN_CONFIGURE */
#endif /* !ENABLE_THREAD_SAFETY && !IN_CONFIGURE */