This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] [BZ#20311] Update and install proc_service.h


This adds an include guard and __BEGIN/__END_DECLS to proc_service.h,
and then arranges to install it.  The idea here is to make it more
convenient to implement the proc_service.h API.  This fixes BZ#20311.

Tested by rebuilding and installing; then examining the output of
"gcc -E", both for C and C++, with the installed header.
---
 ChangeLog              | 7 +++++++
 nptl_db/Makefile       | 2 +-
 nptl_db/proc_service.h | 9 +++++++++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index d7b67d6..b492c72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-07-22  Tom Tromey  <tom@tromey.com>
+
+	[BZ #20311]
+	* nptl_db/Makefile (headers): Add proc_service.h.
+	* nptl_db/proc_service.h: Add include guard.  Use
+	__BEGIN/__END_DECLS.
+
 2016-07-21  Gustavo Romero  <gromero@linux.vnet.ibm.com>
 
 	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Fix missing verb
diff --git a/nptl_db/Makefile b/nptl_db/Makefile
index 849a73f..bc20440 100644
--- a/nptl_db/Makefile
+++ b/nptl_db/Makefile
@@ -26,7 +26,7 @@ nptl_db-version = 1.0
 extra-libs = libthread_db
 extra-libs-others := $(extra-libs)
 
-headers         = thread_db.h sys/procfs.h
+headers         = proc_service.h thread_db.h sys/procfs.h
 
 libthread_db-routines = td_init td_log td_ta_new td_ta_delete \
 			td_ta_get_nthreads td_ta_get_ph \
diff --git a/nptl_db/proc_service.h b/nptl_db/proc_service.h
index c1c139f..c89d12d 100644
--- a/nptl_db/proc_service.h
+++ b/nptl_db/proc_service.h
@@ -16,9 +16,14 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef _PROC_SERVICE_H
+#define _PROC_SERVICE_H 1
+
 /* The definitions in this file must correspond to those in the debugger.  */
 #include <sys/procfs.h>
 
+__BEGIN_DECLS
+
 /* Functions in this interface return one of these status codes.  */
 typedef enum
 {
@@ -84,3 +89,7 @@ extern ps_err_e ps_pcontinue (const struct ps_prochandle *);
 /* Stop or continue the given LWP alone.  */
 extern ps_err_e ps_lstop (const struct ps_prochandle *, lwpid_t);
 extern ps_err_e ps_lcontinue (const struct ps_prochandle *, lwpid_t);
+
+__END_DECLS
+
+#endif /* proc_service.h */
-- 
2.7.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]