Operating System: OpenVMS ALPHA V7.3 Compiler: Compaq C T6.5 Compiler switches: /WARN=ENABLE=(LEVEL4, QUESTCODE) syscall.c is missing the "const" qualifiers for several of it's functions. This patch should supercede the previous patch I submitted. This was discovered while working on resovling the conflicts between signed and unsigned values. -John wb8tyw@qsl.network Personal Opinion Only EAGLE> type syscall.gdiff --- ref_src:syscall.c Sat Jan 5 13:27:07 2002 +++ lcl_src:syscall.c Sun Jan 6 23:12:41 2002 @@ -1,3 +1,4 @@ +/* Converted by prj_src:unix_c_to_vms_c.tpu AND prj_src:syscall.tpu on 6-JAN-2 002 23:12:41.17 OPENVMS_AXP */ /* Copyright (C) Andrew Tridgell 1998 @@ -28,22 +29,24 @@ #define CHECK_RO if (read_only || list_only) {errno = EROFS; return -1;} -int do_unlink(char *fname) +int do_unlink(const char *fname) { if (dry_run) return 0; CHECK_RO return unlink(fname); } -int do_symlink(char *fname1, char *fname2) +#if SUPPORT_LINKS +int do_symlink(const char *fname1, const char *fname2) { if (dry_run) return 0; CHECK_RO return symlink(fname1, fname2); } +#endif -#if HAVE_LINK -int do_link(char *fname1, char *fname2) +#if SUPPORT_HARD_LINKS +int do_link(const char *fname1, const char *fname2) { if (dry_run) return 0; CHECK_RO @@ -58,8 +61,8 @@ return lchown(path, owner, group); } -#if HAVE_MKNOD -int do_mknod(char *pathname, mode_t mode, dev_t dev) +#ifdef HAVE_MKNOD +int do_mknod(const char *pathname, mode_t mode, dev_t dev) { if (dry_run) return 0; CHECK_RO @@ -67,14 +70,14 @@ } #endif -int do_rmdir(char *pathname) +int do_rmdir(const char *pathname) { if (dry_run) return 0; CHECK_RO return rmdir(pathname); } -int do_open(char *pathname, int flags, mode_t mode) +int do_open(const char * pathname, int flags, mode_t mode) { if (flags != O_RDONLY) { if (dry_run) return -1; @@ -90,7 +93,7 @@ return open(pathname, flags, mode); } -#if HAVE_CHMOD +#ifdef HAVE_CHMOD int do_chmod(const char *path, mode_t mode) { if (dry_run) return 0; @@ -99,14 +102,14 @@ } #endif -int do_rename(char *fname1, char *fname2) +int do_rename(const char *fname1, const char *fname2) { if (dry_run) return 0; CHECK_RO return rename(fname1, fname2); } -int do_mkdir(char *fname, mode_t mode) +int do_mkdir(const char *fname, mode_t mode) { if (dry_run) return 0; CHECK_RO @@ -138,7 +141,7 @@ int do_stat(const char *fname, STRUCT_STAT *st) { -#if HAVE_OFF64_T +#ifdef HAVE_OFF64_T return stat64(fname, st); #else return stat(fname, st); @@ -148,7 +151,7 @@ #if SUPPORT_LINKS int do_lstat(const char *fname, STRUCT_STAT *st) { -#if HAVE_OFF64_T +#ifdef HAVE_OFF64_T return lstat64(fname, st); #else return lstat(fname, st); @@ -158,7 +161,7 @@ int do_fstat(int fd, STRUCT_STAT *st) { -#if HAVE_OFF64_T +#ifdef HAVE_OFF64_T return fstat64(fd, st); #else return fstat(fd, st); @@ -167,7 +170,7 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence) { -#if HAVE_OFF64_T +#ifdef HAVE_OFF64_T off64_t lseek64(); return lseek64(fd, offset, whence); #else @@ -178,7 +181,7 @@ #ifdef USE_MMAP void *do_mmap(void *start, int len, int prot, int flags, int fd, OFF_T offset) { -#if HAVE_OFF64_T +#ifdef HAVE_OFF64_T return mmap64(start, len, prot, flags, fd, offset); #else return mmap(start, len, prot, flags, fd, offset); @@ -188,7 +191,7 @@ char *d_name(struct dirent *di) { -#if HAVE_BROKEN_READDIR +#ifdef HAVE_BROKEN_READDIR return (di->d_name - 2); #else return di->d_name;