This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB 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]

[binutils-gdb] Protect nat/gdb_thread_db.h against multiple inclusion.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=260439cb8ec21ffd75b240aadc55fd341c8c8dd4

commit 260439cb8ec21ffd75b240aadc55fd341c8c8dd4
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Wed Aug 5 16:30:57 2015 +0200

    Protect nat/gdb_thread_db.h against multiple inclusion.
    
    Fixes a build error due to typedef redefinition with some compilers.
    
    Also added missing copyright header.
    
    gdb/
    	* nat/gdb_thread_db.h: Add copyright header.
    	Protect against multiple inclusion.

Diff:
---
 gdb/ChangeLog           |  5 +++++
 gdb/nat/gdb_thread_db.h | 22 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1eef8b7..5d61823 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* nat/gdb_thread_db.h: Add copyright header.
+	Protect against multiple inclusion.
+
 2015-08-05  Yao Qi  <yao.qi@linaro.org>
 
 	* aarch64-linux-nat.c (get_thread_id): Remove.
diff --git a/gdb/nat/gdb_thread_db.h b/gdb/nat/gdb_thread_db.h
index 2938eaf..3be4170 100644
--- a/gdb/nat/gdb_thread_db.h
+++ b/gdb/nat/gdb_thread_db.h
@@ -1,3 +1,23 @@
+/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   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
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   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, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GDB_THREAD_DB_H
+#define GDB_THREAD_DB_H 1
+
 #ifdef HAVE_THREAD_DB_H
 #include <thread_db.h>
 #else
@@ -52,3 +72,5 @@ typedef td_err_e (td_thr_tlsbase_ftype) (const td_thrhandle_t *th,
 
 typedef const char ** (td_symbol_list_ftype) (void);
 typedef td_err_e (td_ta_delete_ftype) (td_thragent_t *);
+
+#endif /* GDB_THREAD_DB_H */


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