* vfs.c (MC_RENAMEOP): Make arguments const.

* vfs.h (mc_rename): Adjust declaration.
* (mc_link): Likewise.
This commit is contained in:
Andrew V. Samoilov 2002-05-13 15:39:22 +00:00
parent 2a0dde7539
commit baf5611b51
3 changed files with 9 additions and 5 deletions

View File

@ -2,6 +2,10 @@
* Makefile.am (mcserv_SOURCES): Add $(top_srcdir)/src/mad.c. * Makefile.am (mcserv_SOURCES): Add $(top_srcdir)/src/mad.c.
* vfs.c (MC_RENAMEOP): Make arguments const.
* vfs.h (mc_rename): Adjust declaration.
* (mc_link): Likewise.
2002-05-11 Andrew V. Samoilov <kai@cmail.ru> 2002-05-11 Andrew V. Samoilov <kai@cmail.ru>
* samba/configure.in: Add AC_SYS_LARGEFILE. * samba/configure.in: Add AC_SYS_LARGEFILE.

View File

@ -671,14 +671,14 @@ MC_NAMEOP (unlink, (char *path), (vfs, vfs_name (path)))
MC_NAMEOP (symlink, (char *name1, char *path), (vfs, vfs_name (name1), vfs_name (path))) MC_NAMEOP (symlink, (char *name1, char *path), (vfs, vfs_name (name1), vfs_name (path)))
#define MC_RENAMEOP(name) \ #define MC_RENAMEOP(name) \
int mc_##name (char *name1, char *name2) \ int mc_##name (const char *fname1, const char *fname2) \
{ \ { \
vfs *vfs; \ vfs *vfs; \
int result; \ int result; \
\ \
name1 = vfs_canon (name1); \ char *name2, *name1 = vfs_canon (fname1); \
vfs = vfs_type (name1); \ vfs = vfs_type (name1); \
name2 = vfs_canon (name2); \ name2 = vfs_canon (fname2); \
if (vfs != vfs_type (name2)){ \ if (vfs != vfs_type (name2)){ \
errno = EXDEV; \ errno = EXDEV; \
g_free (name1); \ g_free (name1); \

View File

@ -197,9 +197,9 @@
int mc_readlink (char *path, char *buf, int bufsiz); int mc_readlink (char *path, char *buf, int bufsiz);
int mc_unlink (char *path); int mc_unlink (char *path);
int mc_symlink (char *name1, char *name2); int mc_symlink (char *name1, char *name2);
int mc_link (char *name1, char *name2); int mc_link (const char *name1, const char *name2);
int mc_mknod (char *, int, int); int mc_mknod (char *, int, int);
int mc_rename (char *original, char *target); int mc_rename (const char *original, const char *target);
int mc_write (int fd, char *buf, int nbyte); int mc_write (int fd, char *buf, int nbyte);
int mc_rmdir (char *path); int mc_rmdir (char *path);
int mc_mkdir (char *path, mode_t mode); int mc_mkdir (char *path, mode_t mode);