This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils 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] bfd: Rename warn_deprecated


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

commit 8c8402ccf1e69a4b8971994deb19f9d88e665925
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Feb 17 01:26:12 2017 +0000

    bfd: Rename warn_deprecated
    
    Give this bfd-internal symbol with external linkage a _bfd_ prefix to
    avoid collisions in the global symbol namespace.
    
    bfd/ChangeLog:
    2017-02-17  Pedro Alves  <palves@redhat.com>
    
    	* bfd-in.h (bfd_read, bfd_write): Adjust to rename.
    	(warn_deprecated): Rename to ...
    	(_bfd_warn_deprecated): ... this.
    	* libbfd.c (warn_deprecated): Rename to ...
    	(_bfd_warn_deprecated): ... this.
    	* bfd-in2.h: Regenerate.

Diff:
---
 bfd/ChangeLog |  9 +++++++++
 bfd/bfd-in.h  | 10 +++++-----
 bfd/bfd-in2.h | 10 +++++-----
 bfd/libbfd.c  |  8 ++++----
 4 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9b416ab..5c07484 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,14 @@
 2017-02-17  Pedro Alves  <palves@redhat.com>
 
+	* bfd-in.h (bfd_read, bfd_write): Adjust to rename.
+	(warn_deprecated): Rename to ...
+	(_bfd_warn_deprecated): ... this.
+	* libbfd.c (warn_deprecated): Rename to ...
+	(_bfd_warn_deprecated): ... this.
+	* bfd-in2.h: Regenerate.
+
+2017-02-17  Pedro Alves  <palves@redhat.com>
+
 	* bfdio.c (real_ftell): Rename to ...
 	(_bfd_real_ftell): ... this.
 	(real_fseek): Rename to ...
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 98b69d0..98c1bc3 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -486,20 +486,20 @@ extern int bfd_stat (bfd *, struct stat *);
 /* Deprecated old routines.  */
 #if __GNUC__
 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__),	\
+  (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__),	\
    bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__),	\
+  (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__),	\
    bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #else
 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
+  (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
    bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
+  (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
    bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #endif
-extern void warn_deprecated (const char *, const char *, int, const char *);
+extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
 
 /* Cast from const char * to char * so that caller can assign to
    a char * without a warning.  */
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index f90bb8c..f17813a 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -493,20 +493,20 @@ extern int bfd_stat (bfd *, struct stat *);
 /* Deprecated old routines.  */
 #if __GNUC__
 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__),	\
+  (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__),	\
    bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__),	\
+  (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__),	\
    bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #else
 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
+  (_bfd_warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
    bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)				\
-  (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
+  (_bfd_warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
    bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #endif
-extern void warn_deprecated (const char *, const char *, int, const char *);
+extern void _bfd_warn_deprecated (const char *, const char *, int, const char *);
 
 /* Cast from const char * to char * so that caller can assign to
    a char * without a warning.  */
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index 4a3e4c2..46bb232 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -927,10 +927,10 @@ bfd_generic_is_local_label_name (bfd *abfd, const char *name)
    old routines.  */
 
 void
-warn_deprecated (const char *what,
-		 const char *file,
-		 int line,
-		 const char *func)
+_bfd_warn_deprecated (const char *what,
+		      const char *file,
+		      int line,
+		      const char *func)
 {
   /* Poor man's tracking of functions we've already warned about.  */
   static size_t mask = 0;


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