projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rint* tests: Avoid gcc warnings.
[gnulib.git]
/
lib
/
pthread.in.h
diff --git
a/lib/pthread.in.h
b/lib/pthread.in.h
index
a3669a5
..
6f93e29
100644
(file)
--- a/
lib/pthread.in.h
+++ b/
lib/pthread.in.h
@@
-1,6
+1,6
@@
/* Implement a trivial subset of POSIX 1003.1-2008 pthread.h.
/* Implement a trivial subset of POSIX 1003.1-2008 pthread.h.
- Copyright (C) 2009-201
1
Free Software Foundation, Inc.
+ Copyright (C) 2009-201
2
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-13,12
+13,11
@@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Paul Eggert and Glen Lenker. */
/* Written by Paul Eggert and Glen Lenker. */
-#ifndef _
GL
_PTHREAD_H_
+#ifndef _
@GUARD_PREFIX@
_PTHREAD_H_
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@
-30,8
+29,8
@@
# @INCLUDE_NEXT@ @NEXT_PTHREAD_H@
#endif
# @INCLUDE_NEXT@ @NEXT_PTHREAD_H@
#endif
-#ifndef _
GL
_PTHREAD_H_
-#define _
GL
_PTHREAD_H_
+#ifndef _
@GUARD_PREFIX@
_PTHREAD_H_
+#define _
@GUARD_PREFIX@
_PTHREAD_H_
#include <errno.h>
#include <stdlib.h>
#include <errno.h>
#include <stdlib.h>
@@
-40,6
+39,7
@@
#include <time.h>
#if ! @HAVE_PTHREAD_T@
#include <time.h>
#if ! @HAVE_PTHREAD_T@
+# if !GNULIB_defined_pthread_types
typedef int pthread_t;
typedef int pthread_attr_t;
typedef int pthread_barrier_t;
typedef int pthread_t;
typedef int pthread_attr_t;
typedef int pthread_barrier_t;
@@
-52,6
+52,8
@@
typedef int pthread_once_t;
typedef int pthread_rwlock_t;
typedef int pthread_rwlockattr_t;
typedef int pthread_once_t;
typedef int pthread_rwlock_t;
typedef int pthread_rwlockattr_t;
+# define GNULIB_defined_pthread_types 1
+# endif
#endif
#ifndef PTHREAD_COND_INITIALIZER
#endif
#ifndef PTHREAD_COND_INITIALIZER
@@
-97,6
+99,8
@@
#if ! @HAVE_PTHREAD_T@
#if ! @HAVE_PTHREAD_T@
+# if !GNULIB_defined_pthread_functions
+
/* Provide substitutes for the thread functions that should work
adequately on a single-threaded implementation, where
pthread_create always fails. The goal is to let programs compile
/* Provide substitutes for the thread functions that should work
adequately on a single-threaded implementation, where
pthread_create always fails. The goal is to let programs compile
@@
-217,10
+221,15
@@
pthread_mutex_unlock (pthread_mutex_t *mutex)
return 0;
}
return 0;
}
+# define GNULIB_defined_pthread_functions 1
+# endif
+
#endif
#if ! @HAVE_PTHREAD_SPINLOCK_T@
#endif
#if ! @HAVE_PTHREAD_SPINLOCK_T@
+# if !GNULIB_defined_pthread_spinlock_t
+
/* Approximate spinlocks with mutexes. */
typedef pthread_mutex_t pthread_spinlock_t;
/* Approximate spinlocks with mutexes. */
typedef pthread_mutex_t pthread_spinlock_t;
@@
-254,7
+263,11
@@
pthread_spin_unlock (pthread_spinlock_t *lock)
{
return pthread_mutex_unlock (lock);
}
{
return pthread_mutex_unlock (lock);
}
+
+# define GNULIB_defined_pthread_spinlock_t 1
+# endif
+
#endif
#endif
-#endif /* _
GL
_PTHREAD_H_ */
-#endif /* _
GL
_PTHREAD_H_ */
+#endif /* _
@GUARD_PREFIX@
_PTHREAD_H_ */
+#endif /* _
@GUARD_PREFIX@
_PTHREAD_H_ */