DARWIN sync: add some 'const' attributes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10022 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c
index 0a28224..ee15c66 100644
--- a/coregrind/m_libcfile.c
+++ b/coregrind/m_libcfile.c
@@ -274,7 +274,7 @@
    return (res == -1) ? (-1LL) : buf.size;
 }
 
-Bool VG_(is_dir) ( HChar* f )
+Bool VG_(is_dir) ( const HChar* f )
 {
    struct vg_stat buf;
    SysRes res = VG_(stat)(f, &buf);
@@ -305,13 +305,13 @@
    return sr_isError(res) ? -1 : sr_Res(res);
 }
 
-Int VG_(rename) ( Char* old_name, Char* new_name )
+Int VG_(rename) ( const Char* old_name, const Char* new_name )
 {
    SysRes res = VG_(do_syscall2)(__NR_rename, (UWord)old_name, (UWord)new_name);
    return sr_isError(res) ? (-1) : 0;
 }
 
-Int VG_(unlink) ( Char* file_name )
+Int VG_(unlink) ( const Char* file_name )
 {
    SysRes res = VG_(do_syscall1)(__NR_unlink, (UWord)file_name);
    return sr_isError(res) ? (-1) : 0;
@@ -384,7 +384,7 @@
    return True;
 }
 
-Int VG_(readlink) (Char* path, Char* buf, UInt bufsiz)
+Int VG_(readlink) (const Char* path, Char* buf, UInt bufsiz)
 {
    SysRes res;
    /* res = readlink( path, buf, bufsiz ); */
@@ -406,7 +406,7 @@
 
 /* Check accessibility of a file.  Returns zero for access granted,
    nonzero otherwise. */
-Int VG_(access) ( HChar* path, Bool irusr, Bool iwusr, Bool ixusr )
+Int VG_(access) ( const HChar* path, Bool irusr, Bool iwusr, Bool ixusr )
 {
 #  if defined(VGO_linux)
    /* Very annoyingly, I cannot find any definition for R_OK et al in
@@ -452,7 +452,7 @@
 */
 /* returns: 0 = success, non-0 is failure */
 Int VG_(check_executable)(/*OUT*/Bool* is_setuid,
-                          HChar* f, Bool allow_setuid)
+                          const HChar* f, Bool allow_setuid)
 {
    struct vg_stat st;
    SysRes res = VG_(stat)(f, &st);
diff --git a/coregrind/pub_core_libcfile.h b/coregrind/pub_core_libcfile.h
index 4ff074f..0807778 100644
--- a/coregrind/pub_core_libcfile.h
+++ b/coregrind/pub_core_libcfile.h
@@ -50,7 +50,7 @@
 extern Long VG_(fsize) ( Int fd );
 
 /* Is the file a directory? */
-extern Bool VG_(is_dir) ( HChar* f );
+extern Bool VG_(is_dir) ( const HChar* f );
 
 /* Default destination port to be used in logging over a network, if
    none specified. */
@@ -68,11 +68,12 @@
 extern Int VG_(getsockopt)  ( Int sd, Int level, Int optname, void *optval,
                               Int *optlen );
 
-extern Int VG_(access) ( HChar* path, Bool irusr, Bool iwusr, Bool ixusr );
+extern Int VG_(access) ( const HChar* path, Bool irusr, Bool iwusr,
+                                            Bool ixusr );
 
 /* Is the file executable?  Returns: 0 = success, non-0 is failure */
 extern Int VG_(check_executable)(/*OUT*/Bool* is_setuid,
-                                 HChar* f, Bool allow_setuid);
+                                 const HChar* f, Bool allow_setuid);
 
 /* Note this moves (or at least, is believed to move) the file pointer
    on Linux and AIX5 but doesn't on Darwin.  This inconsistency should