changeset 502:b43ec5f18a97

* include/cyg_ass.h (CYG_CHECK_FUNC_PTRC): Define with const pointer arguments. (CYG_CHECK_DATA_PTRC): Ditto. (CYG_CHECK_FUNC_PTR): Ditto. (CYG_CHECK_DATA_PTR): Ditto. * src/null.cxx: Define cyg_check_data/func_ptr() with const args. * src/buffer.cxx: Ditto. * src/fancy.cxx: Ditto. * src/simple.cxx: Ditto.
author jlarmour
date Sat, 18 Jan 2003 04:18:26 +0000
parents 7b8fa5a6b0b3
children 56f2bffbde39
files packages/infra/current/ChangeLog packages/infra/current/include/cyg_ass.h packages/infra/current/src/buffer.cxx packages/infra/current/src/fancy.cxx packages/infra/current/src/null.cxx packages/infra/current/src/simple.cxx
diffstat 6 files changed, 26 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/packages/infra/current/ChangeLog
+++ b/packages/infra/current/ChangeLog
@@ -1,3 +1,15 @@
+2003-01-18  Jonathan Larmour  <jifl@eCosCentric.com>
+
+	* include/cyg_ass.h (CYG_CHECK_FUNC_PTRC): Define with const pointer
+	arguments.
+	(CYG_CHECK_DATA_PTRC): Ditto. 
+	(CYG_CHECK_FUNC_PTR): Ditto. 
+	(CYG_CHECK_DATA_PTR): Ditto. 
+	* src/null.cxx: Define cyg_check_data/func_ptr() with const args.
+	* src/buffer.cxx: Ditto.
+	* src/fancy.cxx: Ditto.
+	* src/simple.cxx: Ditto.
+
 2002-07-18  Gary Thomas  <gary@chez-thomas.org>
 
 	* include/diag.h: 
--- a/packages/infra/current/include/cyg_ass.h
+++ b/packages/infra/current/include/cyg_ass.h
@@ -156,32 +156,32 @@ cyg_assert_msg( const char *psz_func, co
 // with different formats, and so we can check them against different memory
 // regions.
 
-externC cyg_bool cyg_check_data_ptr(void *ptr);
-externC cyg_bool cyg_check_func_ptr(void (*ptr)(void));
+externC cyg_bool cyg_check_data_ptr(const void *ptr);
+externC cyg_bool cyg_check_func_ptr(const void (*ptr)(void));
 
 #ifdef CYGDBG_USE_ASSERTS
 
 # define CYG_CHECK_DATA_PTR( _ptr_, _msg_ )             \
         CYG_MACRO_START                                 \
-        if( !cyg_check_data_ptr((void *)(_ptr_)))       \
+        if( !cyg_check_data_ptr((const void *)(_ptr_)))       \
            CYG_ASSERT_DOCALL( _msg_ );                   \
         CYG_MACRO_END
 
 # define CYG_CHECK_FUNC_PTR( _ptr_, _msg_ )             \
         CYG_MACRO_START                                 \
-        if( !cyg_check_func_ptr((void (*)(void))(_ptr_))) \
+        if( !cyg_check_func_ptr((const void (*)(void))(_ptr_))) \
            CYG_ASSERT_DOCALL( _msg_ );                   \
         CYG_MACRO_END
         
 # define CYG_CHECK_DATA_PTRC( _ptr_ )                   \
          CYG_MACRO_START                                \
-         if ( !cyg_check_data_ptr((void *)(_ptr_)))     \
+         if ( !cyg_check_data_ptr((const void *)(_ptr_)))     \
              CYG_ASSERT_DOCALL("data pointer (" #_ptr_ ") is valid");\
          CYG_MACRO_END
 
 # define CYG_CHECK_FUNC_PTRC( _ptr_ )                       \
          CYG_MACRO_START                                    \
-         if ( !cyg_check_func_ptr((void (*)(void))(_ptr_))) \
+         if ( !cyg_check_func_ptr((const void (*)(void))(_ptr_))) \
              CYG_ASSERT_DOCALL("function pointer (" #_ptr_ ") is valid"); \
          CYG_MACRO_END
 
--- a/packages/infra/current/src/buffer.cxx
+++ b/packages/infra/current/src/buffer.cxx
@@ -761,7 +761,7 @@ unsigned long stext_addr = (unsigned lon
 unsigned long etext_addr = (unsigned long)&_etext;
 };
 
-externC cyg_bool cyg_check_data_ptr(void *ptr)
+externC cyg_bool cyg_check_data_ptr(const void *ptr)
 {
     unsigned long p = (unsigned long)ptr;
     
@@ -772,7 +772,7 @@ externC cyg_bool cyg_check_data_ptr(void
     return true;
 }
 
-externC cyg_bool cyg_check_func_ptr(void (*ptr)(void))
+externC cyg_bool cyg_check_func_ptr(const void (*ptr)(void))
 {
     unsigned long p = (unsigned long)ptr;
     
--- a/packages/infra/current/src/fancy.cxx
+++ b/packages/infra/current/src/fancy.cxx
@@ -632,7 +632,7 @@ unsigned long stext_addr = (unsigned lon
 unsigned long etext_addr = (unsigned long)&_etext;
 };
 
-externC cyg_bool cyg_check_data_ptr(void *ptr)
+externC cyg_bool cyg_check_data_ptr(const void *ptr)
 {
     unsigned long p = (unsigned long)ptr;
     
@@ -643,7 +643,7 @@ externC cyg_bool cyg_check_data_ptr(void
     return true;
 }
 
-externC cyg_bool cyg_check_func_ptr(void (*ptr)(void))
+externC cyg_bool cyg_check_func_ptr(const void (*ptr)(void))
 {
     unsigned long p = (unsigned long)ptr;
     
--- a/packages/infra/current/src/null.cxx
+++ b/packages/infra/current/src/null.cxx
@@ -155,7 +155,7 @@ unsigned long stext_addr = (unsigned lon
 unsigned long etext_addr = (unsigned long)&_etext;
 };
 
-externC cyg_bool cyg_check_data_ptr(void *ptr)
+externC cyg_bool cyg_check_data_ptr(const void *ptr)
 {
     unsigned long p = (unsigned long)ptr;
     
@@ -166,7 +166,7 @@ externC cyg_bool cyg_check_data_ptr(void
     return true;
 }
 
-externC cyg_bool cyg_check_func_ptr(void (*ptr)(void))
+externC cyg_bool cyg_check_func_ptr(const void (*ptr)(void))
 {
     unsigned long p = (unsigned long)ptr;
     
--- a/packages/infra/current/src/simple.cxx
+++ b/packages/infra/current/src/simple.cxx
@@ -533,7 +533,7 @@ unsigned long stext_addr = (unsigned lon
 unsigned long etext_addr = (unsigned long)&_etext;
 };
 
-externC cyg_bool cyg_check_data_ptr(void *ptr)
+externC cyg_bool cyg_check_data_ptr(const void *ptr)
 {
     unsigned long p = (unsigned long)ptr;
     
@@ -544,7 +544,7 @@ externC cyg_bool cyg_check_data_ptr(void
     return true;
 }
 
-externC cyg_bool cyg_check_func_ptr(void (*ptr)(void))
+externC cyg_bool cyg_check_func_ptr(const void (*ptr)(void))
 {
     unsigned long p = (unsigned long)ptr;