Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcded27c

Browse files
committed
Don't reference pthread.h unless we have threads enabled, per Peter.
1 parent863d793 commitcded27c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎src/port/thread.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
*
88
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
99
*
10-
* $Id: thread.c,v 1.10 2003/09/29 03:32:05 momjian Exp $
10+
* $Id: thread.c,v 1.11 2003/10/24 20:48:10 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414

1515
#include"postgres.h"
1616

17+
#if defined(USE_THREADS)
1718
#include<pthread.h>
19+
#endif
1820
#include<sys/types.h>
1921
#include<pwd.h>
2022
#include<errno.h>

‎src/tools/thread/thread_test.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
*$Header: /cvsroot/pgsql/src/tools/thread/Attic/thread_test.c,v 1.2 2003/09/27 16:24:45 momjian Exp $
9+
*$Header: /cvsroot/pgsql/src/tools/thread/Attic/thread_test.c,v 1.3 2003/10/24 20:48:10 momjian Exp $
1010
*
1111
*This program tests to see if your standard libc functions use
1212
*pthread_setspecific()/pthread_getspecific() to be thread-safe.
@@ -21,7 +21,9 @@
2121
*/
2222

2323

24+
#ifdefUSE_THREADS
2425
#include<pthread.h>
26+
#endif
2527
#include<unistd.h>
2628
#include<stdio.h>
2729
#include<stdlib.h>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp