]> Savannah Git Hosting - gnulib.git/commitdiff
pthread: Turn into a convenience module.
authorBruno Haible <bruno@clisp.org>
Mon, 15 Jul 2019 00:41:05 +0000 (02:41 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 15 Jul 2019 00:41:05 +0000 (02:41 +0200)
* lib/pthread.in.h: Remove declarations for extern inline functions.
* lib/pthread.c: Remove file.
* modules/pthread (Files): Remove it.
(Depends-on): Add pthread-thread, pthread-once, pthread-mutex,
pthread-rwlock, pthread-cond, pthread-tss, pthread-spin.
(configure.ac): Don't compile lib/pthread.c. Don't set GNULIB_PTHREAD.
* m4/pthread_h.m4 (gl_PTHREAD_H_DEFAULTS): Don't initialize
GNULIB_PTHREAD.
* modules/pthread-h (Makefile.am): Don't substitute GNULIB_PTHREAD.

ChangeLog
lib/pthread.c [deleted file]
lib/pthread.in.h
m4/pthread_h.m4
modules/pthread
modules/pthread-h

index ebe77e15c220d4146422704c505023a301cabab2..1144af36b898f8d6245295a03014f0c2e98ae5ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2019-07-14  Bruno Haible  <bruno@clisp.org>
+
+       pthread: Turn into a convenience module.
+       * lib/pthread.in.h: Remove declarations for extern inline functions.
+       * lib/pthread.c: Remove file.
+       * modules/pthread (Files): Remove it.
+       (Depends-on): Add pthread-thread, pthread-once, pthread-mutex,
+       pthread-rwlock, pthread-cond, pthread-tss, pthread-spin.
+       (configure.ac): Don't compile lib/pthread.c. Don't set GNULIB_PTHREAD.
+       * m4/pthread_h.m4 (gl_PTHREAD_H_DEFAULTS): Don't initialize
+       GNULIB_PTHREAD.
+       * modules/pthread-h (Makefile.am): Don't substitute GNULIB_PTHREAD.
+
 2019-07-14  Bruno Haible  <bruno@clisp.org>
 
        pthread-spin: New module.
diff --git a/lib/pthread.c b/lib/pthread.c
deleted file mode 100644 (file)
index 188eb0a..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <config.h>
-#define _GL_PTHREAD_INLINE _GL_EXTERN_INLINE
-#include "pthread.h"
-typedef int dummy;
index d0f3ad8bda98d9be10bc9619aa3def329148c285..c8963c832b305329e802cba694d7c5ba1c7ff61c 100644 (file)
 
 /* The definition of _GL_WARN_ON_USE is copied here.  */
 
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
-_GL_INLINE_HEADER_BEGIN
-#ifndef _GL_PTHREAD_INLINE
-# define _GL_PTHREAD_INLINE _GL_INLINE
-#endif
-
 /* =========== Thread types and macros =========== */
 
 #if @GNULIB_PTHREAD_THREAD@ && (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
@@ -1720,8 +1712,6 @@ _GL_WARN_ON_USE (pthread_spin_destroy, "pthread_spin_destroy is not portable - "
 #endif
 
 
-_GL_INLINE_HEADER_END
-
 #endif /* _@GUARD_PREFIX@_PTHREAD_H_ */
 #endif /* _@GUARD_PREFIX@_PTHREAD_H_ */
 #endif
index a35e748a87f2318d356c976bac193f06ac88ec43..8c23a77794fdb0f58eff2a39c5e099f83f53c8df 100644 (file)
@@ -140,7 +140,6 @@ AC_DEFUN([gl_PTHREAD_MODULE_INDICATOR],
 
 AC_DEFUN([gl_PTHREAD_H_DEFAULTS],
 [
-  GNULIB_PTHREAD=0;                      AC_SUBST([GNULIB_PTHREAD])
   GNULIB_PTHREAD_THREAD=0;               AC_SUBST([GNULIB_PTHREAD_THREAD])
   GNULIB_PTHREAD_ONCE=0;                 AC_SUBST([GNULIB_PTHREAD_ONCE])
   GNULIB_PTHREAD_MUTEX=0;                AC_SUBST([GNULIB_PTHREAD_MUTEX])
index a778cb163ffd4762b1806991b80b97d7f30a772f..c9c5614b21e37bf24fa516cd9ad7d91046e5dbfd 100644 (file)
@@ -2,16 +2,18 @@ Description:
 Implement the most essential subset of the pthreads library.
 
 Files:
-lib/pthread.c
 
 Depends-on:
 pthread-h
+pthread-thread
+pthread-once
+pthread-mutex
+pthread-rwlock
+pthread-cond
+pthread-tss
+pthread-spin
 
 configure.ac:
-if test $HAVE_PTHREAD_H = 0 || test $HAVE_PTHREAD_T = 0 || test $HAVE_PTHREAD_SPINLOCK_T = 0; then
-  AC_LIBOBJ([pthread])
-fi
-gl_MODULE_INDICATOR([pthread])
 
 Makefile.am:
 
index 12ba70a719695d568ba1711121784c32ff903c31..3a9c1501c3613da2700b874eb9ae14f1f147a6bd 100644 (file)
@@ -37,7 +37,6 @@ pthread.h: pthread.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(_NORETURN_H
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_PTHREAD_H''@|$(NEXT_PTHREAD_H)|g' \
-             -e 's/@''GNULIB_PTHREAD''@/$(GNULIB_PTHREAD)/g' \
              -e 's/@''GNULIB_PTHREAD_THREAD''@/$(GNULIB_PTHREAD_THREAD)/g' \
              -e 's/@''GNULIB_PTHREAD_ONCE''@/$(GNULIB_PTHREAD_ONCE)/g' \
              -e 's/@''GNULIB_PTHREAD_MUTEX''@/$(GNULIB_PTHREAD_MUTEX)/g' \