bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for 1.11 to compile under vms 7.2/decc 5.7


From: Derek R. Price
Subject: Re: Patch for 1.11 to compile under vms 7.2/decc 5.7
Date: Wed, 10 Jan 2001 14:03:18 -0500

Checked in.  I added some ChangeLog entries and a few minor tweaks to get the
changes into 1.11.0.1.  We won't know for sure if they work until someone 
downloads
the dev version and tries to compile.

Derek

--
Derek Price                      CVS Solutions Architect ( http://CVSHome.org )
mailto:address@hidden     OpenAvenue ( http://OpenAvenue.com )
--
You can't fool me, sonny!  It's turtles all the way down!

address@hidden wrote:

> Attached is a patch to cvs 1.11 to compile it under decc 5.7 and vms 7.2.  
> This
> is client side only as there are issuses that need to be worked out on the
> server side.
>
> Rex.
> -----
> YM1701> cvs diff -c -rr1_11
> cvs server: Diffing .
> Index: news
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/news,v
> retrieving revision 1.1.1.2
> retrieving revision 1.3
> diff -c -r1.1.1.2 -r1.3
> *** news        2001/01/09 18:18:06     1.1.1.2
> --- news        2001/01/09 22:33:57     1.3
> ***************
> *** 1,5 ****
> --- 1,7 ----
>   Changes since 1.10:
>
> + * The VMS client now accepts wildcards if you're running VMS 7.x.
> +
>   * The new "cvs version" command gives a short version message.  If
>   the repository is remote, both the client and server versions are
>   reported.
> cvs server: Diffing contrib
> cvs server: Diffing diff
> cvs server: Diffing doc
> cvs server: Diffing emx
> cvs server: Diffing lib
> Index: lib/rename.c
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/lib/rename.c,v
> retrieving revision 1.1.1.1
> retrieving revision 1.2
> diff -c -r1.1.1.1 -r1.2
> *** lib/rename.c        1999/03/01 23:55:33     1.1.1.1
> --- lib/rename.c        2001/01/09 22:33:58     1.2
> ***************
> *** 72,78 ****
>         {
>           /* We don't check existence_error because the systems which need it
>              have rename().  */
> !         if (link (from, to) == 0 && (unlink (from) == 0 || errno == ENOENT))
>             return 0;
>         }
>       }
> --- 72,78 ----
>         {
>           /* We don't check existence_error because the systems which need it
>              have rename().  */
> !         if (link (from, to) == 0 && (CVS_UNLINK (from) == 0 || errno == 
> ENOENT
> ))
>             return 0;
>         }
>       }
> cvs server: tag r1_11 is not in file lib/vasprintf.c
> cvs server: Diffing macintosh
> cvs server: tag r1_11 is not in file macintosh/ae_example.pl
> cvs server: tag r1_11 is not in file macintosh/ae_if.c
> cvs server: tag r1_11 is not in file macintosh/changelog
> cvs server: tag r1_11 is not in file macintosh/config.h
> cvs server: tag r1_11 is not in file macintosh/filesubr.c
> cvs server: tag r1_11 is not in file macintosh/mac_config.h
> cvs server: tag r1_11 is not in file macintosh/mac_init.c
> cvs server: tag r1_11 is not in file macintosh/maccvs.pch
> cvs server: tag r1_11 is not in file macintosh/maccvs.r
> cvs server: tag r1_11 is not in file macintosh/maccvs68k.sit_hqx
> cvs server: tag r1_11 is not in file macintosh/maccvsppc.sit_hqx
> cvs server: tag r1_11 is not in file macintosh/macos_filesys.c
> cvs server: tag r1_11 is not in file macintosh/makefile.in
> cvs server: tag r1_11 is not in file macintosh/options.h
> cvs server: tag r1_11 is not in file macintosh/pwd.c
> cvs server: tag r1_11 is not in file macintosh/pwd.h
> cvs server: tag r1_11 is not in file macintosh/rcmd.c
> cvs server: tag r1_11 is not in file macintosh/readme.maccvs
> cvs server: tag r1_11 is not in file macintosh/run.c
> cvs server: tag r1_11 is not in file macintosh/server_if.c
> cvs server: tag r1_11 is not in file macintosh/services
> cvs server: Diffing man
> cvs server: Diffing os2
> cvs server: tag r1_11 is not in file os2/getdate.c
> cvs server: Diffing src
> Index: src/build_src.com
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/src/build_src.com,v
> retrieving revision 1.1.1.1
> retrieving revision 1.2
> diff -c -r1.1.1.1 -r1.2
> *** src/build_src.com   1999/03/01 23:55:36     1.1.1.1
> --- src/build_src.com   2001/01/09 22:33:58     1.2
> ***************
> *** 64,68 ****
>   status.obj,-
>   subr.obj,tag.obj,update.obj,version.obj,vers_ts.obj,watch.obj,wrapper.obj,-
>   zlib.obj
> ! $ link/nodeb/exe=cvs.exe main.obj,cvslib.olb/lib,[-.lib]gnulib.olb/lib,-
> ! [-.vms]openvmslib.olb/lib,[-.zlib]zlib.olb/lib,[-.diff]diff.olb/lib
> --- 64,68 ----
>   status.obj,-
>   subr.obj,tag.obj,update.obj,version.obj,vers_ts.obj,watch.obj,wrapper.obj,-
>   zlib.obj
> ! $ link/nodeb/exe=cvs.exe main.obj,cvslib.olb/lib,[-.vms]openvmslib.olb/lib,-
> !     [-.zlib]zlib.olb/lib,[-.diff]diff.olb/lib,[-.lib]gnulib.olb/lib
> Index: src/filesubr.c
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/src/filesubr.c,v
> retrieving revision 1.1.1.2
> retrieving revision 1.2
> diff -c -r1.1.1.2 -r1.2
> *** src/filesubr.c      2001/01/09 18:18:08     1.1.1.2
> --- src/filesubr.c      2001/01/09 22:33:58     1.2
> ***************
> *** 418,424 ****
>       if (noexec)
>         return (0);
>
> !     return (unlink (f));
>   }
>
>   /*
> --- 418,424 ----
>       if (noexec)
>         return (0);
>
> !     return (CVS_UNLINK (f));
>   }
>
>   /*
> ***************
> *** 464,470 ****
>       else if (S_ISDIR (sb.st_mode))
>         return deep_remove_dir (f);
>
> !     return unlink (f);
>   }
>
>   /* Remove a directory and everything it contains.  Returns 0 for
> --- 464,470 ----
>       else if (S_ISDIR (sb.st_mode))
>         return deep_remove_dir (f);
>
> !     return CVS_UNLINK (f);
>   }
>
>   /* Remove a directory and everything it contains.  Returns 0 for
> ***************
> *** 519,525 ****
>                 }
>                 else
>                 {
> !                   if (unlink (buf) != 0)
>                     {
>                         closedir(dirp);
>                         free (buf);
> --- 519,525 ----
>                 }
>                 else
>                 {
> !                   if (CVS_UNLINK (buf) != 0)
>                     {
>                         closedir(dirp);
>                         free (buf);
> Index: src/rcs.c
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/src/rcs.c,v
> retrieving revision 1.1.1.2
> retrieving revision 1.2
> diff -c -r1.1.1.2 -r1.2
> *** src/rcs.c   2001/01/09 18:18:09     1.1.1.2
> --- src/rcs.c   2001/01/09 22:33:59     1.2
> ***************
> *** 4147,4153 ****
>                whether it should be considered an error for `dest' to exist
>                at this point.  If so, the unlink call should be removed and
>                `symlink' should signal the error. -twp) */
> !           if (unlink (dest) < 0 && !existence_error (errno))
>                 error (1, errno, "cannot remove %s", dest);
>             if (symlink (info->data, dest) < 0)
>                 error (1, errno, "cannot create symbolic link from %s to %s",
> --- 4147,4153 ----
>                whether it should be considered an error for `dest' to exist
>                at this point.  If so, the unlink call should be removed and
>                `symlink' should signal the error. -twp) */
> !           if (CVS_UNLINK (dest) < 0 && !existence_error (errno))
>                 error (1, errno, "cannot remove %s", dest);
>             if (symlink (info->data, dest) < 0)
>                 error (1, errno, "cannot create symbolic link from %s to %s",
> cvs server: Diffing tools
> cvs server: Diffing vms
> Index: vms/changelog
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/vms/changelog,v
> retrieving revision 1.1.1.2
> retrieving revision 1.3
> diff -c -r1.1.1.2 -r1.3
> *** vms/changelog       2001/01/09 18:18:09     1.1.1.2
> --- vms/changelog       2001/01/09 22:34:00     1.3
> ***************
> *** 1,3 ****
> --- 1,15 ----
> + 1999-03-01  Shawn Smith  <address@hidden>
> +
> +       * filesubr.c (expand_wild): rewrote for VMS 7.x.  Actually
> +       globs vms wildcarded filespecs now.
> +       * pwd.h: put the pid_t define in a conditional since it's
> +       now typedefed in VMS 7.x
> +       * unlink.c: provided correct prototype for unlink based on
> +       version of VMS since it changes.
> +       * vms.h: put conditional compilation macros around mode_t as
> +       it is defined as of VMS 7.x, and fixed prototype of unlink
> +       as per above.
> +
>   1999-02-26  Jim Kingdon  <http://www.cyclic.com>
>
>         * options.h: Make RELATIVE_REPOS the default, as in
> Index: vms/config.h
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/vms/config.h,v
> retrieving revision 1.1.1.1
> retrieving revision 1.3
> diff -c -r1.1.1.1 -r1.3
> *** vms/config.h        1999/03/01 23:55:46     1.1.1.1
> --- vms/config.h        2001/01/10 16:38:49     1.3
> ***************
> *** 126,132 ****
>   /* #undef HAVE_ERRNO_H */
>
>   /* Define if you have the <fcntl.h> header file.  */
> ! /* #undef HAVE_FCNTL_H */
>
>   /* Define if you have the <memory.h> header file.  */
>   /* #undef HAVE_MEMORY_H */
> --- 126,136 ----
>   /* #undef HAVE_ERRNO_H */
>
>   /* Define if you have the <fcntl.h> header file.  */
> ! #ifdef __DECC_VER
> ! #if __DECC_VER >= 50700000
> ! # define HAVE_FCNTL_H 1
> ! #endif
> ! #endif
>
>   /* Define if you have the <memory.h> header file.  */
>   /* #undef HAVE_MEMORY_H */
> ***************
> *** 137,142 ****
> --- 141,152 ----
>   /* Define if you have the <string.h> header file.  */
>   #define HAVE_STRING_H 1
>
> + /* Define to force lib/regex.c to use malloc instead of alloca.  */
> + #define REGEX_MALLOC 1
> +
> + /* Define to force lib/regex.c to define re_comp et al.  */
> + #define _REGEX_RE_COMP 1
> +
>   /* Define if you have the <sys/select.h> header file.  */
>   /* #undef HAVE_SYS_SELECT_H */
>
> ***************
> *** 198,200 ****
> --- 208,212 ----
>      might be worth messing with, but it also seems fine to just always call
>      it "cvs".  */
>   #define ARGV0_NOT_PROGRAM_NAME
> +
> + #define CVS_UNLINK vms_unlink
> Index: vms/filesubr.c
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/vms/filesubr.c,v
> retrieving revision 1.1.1.1
> retrieving revision 1.3
> diff -c -r1.1.1.1 -r1.3
> *** vms/filesubr.c      1999/03/01 23:55:46     1.1.1.1
> --- vms/filesubr.c      2001/01/09 22:34:01     1.3
> ***************
> *** 432,438 ****
>       if (noexec)
>         return (0);
>
> !     return (unlink (f));
>   }
>
>   /*
> --- 432,438 ----
>       if (noexec)
>         return (0);
>
> !     return (vms_unlink (f));
>   }
>
>   /*
> ***************
> *** 464,470 ****
>       if (noexec)
>         return (0);
>
> !     if (unlink (f) != 0)
>       {
>         /* under NEXTSTEP errno is set to return EPERM if
>          * the file is a directory,or if the user is not
> --- 464,470 ----
>       if (noexec)
>         return (0);
>
> !     if (vms_unlink (f) != 0)
>       {
>         /* under NEXTSTEP errno is set to return EPERM if
>          * the file is a directory,or if the user is not
> ***************
> *** 513,519 ****
>
>             sprintf (buf, "%s/%s", path, dp->d_name);
>
> !           if (unlink (buf) != 0 )
>             {
>                 if (errno == EISDIR || errno == EPERM)
>                 {
> --- 513,519 ----
>
>             sprintf (buf, "%s/%s", path, dp->d_name);
>
> !           if (vms_unlink (buf) != 0 )
>             {
>                 if (errno == EISDIR || errno == EPERM)
>                 {
> ***************
> *** 785,790 ****
> --- 785,798 ----
>       return getenv ("HOME");
>   }
>
> + #ifndef __VMS_VER
> + #define __VMS_VER 0
> + #endif
> + #ifndef __DECC_VER
> + #define __DECC_VER 0
> + #endif
> +
> + #if __VMS_VER < 70200000 || __DECC_VER < 50700000
>   /* See cvs.h for description.  On VMS this currently does nothing, although
>      I think we should be expanding wildcards here.  */
>   void
> ***************
> *** 798,802 ****
>       *pargc = argc;
>       *pargv = (char **) xmalloc (argc * sizeof (char *));
>       for (i = 0; i < argc; ++i)
> !       (*pargv)[i] = xstrdup (argv[i]);
>   }
> --- 806,976 ----
>       *pargc = argc;
>       *pargv = (char **) xmalloc (argc * sizeof (char *));
>       for (i = 0; i < argc; ++i)
> !         (*pargv)[i] = xstrdup (argv[i]);
> ! }
> !
> ! #else  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
> !
> ! /* These global variables are necessary to pass information from the
> !  * routine that calls decc$from_vms into the callback routine.  In a
> !  * multi-threaded environment, access to these variables MUST be
> !  * serialized.
> !  */
> ! static char CurWorkingDir[PATH_MAX+1];
> ! static char **ArgvList;
> ! static int  CurArg;
> ! static int  MaxArgs;
> !
> ! static int ew_no_op (char *fname) {
> !     (void) fname;   /* Shut the compiler up */
> !     return 1;       /* Continue */
> ! }
> !
> ! static int ew_add_file (char *fname) {
> !     char *lastslash, *firstper;
> !     int i;
> !
> !     if (strncmp(fname,CurWorkingDir,strlen(CurWorkingDir)) == 0) {
> !         fname += strlen(CurWorkingDir);
> !     }
> !     lastslash = strrchr(fname,'/');
> !     if (!lastslash) {
> !         lastslash = fname;
> !     }
> !     if ((firstper=strchr(lastslash,'.')) != strrchr(lastslash,'.')) {
> !         /* We have two periods -- one is to separate the version off */
> !         *strrchr(fname,'.') = '\0';
> !     }
> !     if (firstper && firstper[1]=='\0') {
> !         *firstper = '\0';
> !     }
> !     /* The following code is to insure that no duplicates appear,
> !      * because most of the time it will just be a different version
> !      */
> !     for (i=0;  i<CurArg && strcmp(ArgvList[i],fname)!=0;  ++i) {
> !         ;
> !     }
> !     if (i==CurArg && CurArg<MaxArgs) {
> !         ArgvList[CurArg++] = strdup(fname);
> !     }
> !     return ArgvList[CurArg-1] != 0; /* Stop if we couldn't dup the string */
>   }
> +
> + /* The following two routines are meant to allow future versions of 
> new_arglis
> t
> +  * routine to be multi-thread-safe.  It will be necessary in that 
> environment
> +  * to serialize access to CurWorkingDir, ArgvList, MaxArg, and CurArg.  We
> +  * currently don't do any multi-threaded programming, so right now these
> +  * routines are no-ops.
> +  */
> + static void wait_and_protect_globs (void) {
> +     return;
> + }
> +
> + static void release_globs (void) {
> +     return;
> + }
> +
> + /*pf---------------------------------------------------------------- 
> expand_wi
> ld
> +  *
> +  *  New Argument List - (SDS)
> +  *
> +  *  DESCRIPTION:
> +  *      This routine takes the argc, argv passed in from main() and returns 
> a
> +  *  new argc, argv list, which simulates (to an extent) Unix-Style filename
> +  *  globbing with VMS wildcards.  The key difference is that it will return
> +  *  Unix-style filenames, i.e., no VMS file version numbers.  The complexity
> +  *  comes from the desire to not simply allocate 10000 argv entries.
> +  *
> +  *  INPUTS:
> +  *      argc - The integer argc passed into main
> +  *      argv - The pointer to the array of char*'s passed into main
> +  *
> +  *  OUTPUTS:
> +  *      pargv - A pointer to a (char **) to hold the new argv list
> +  *      pargc - A pointer to an int to hold the new argc
> +  *
> +  *  RETURNS:
> +  *      NONE
> +  *
> +  *  SIDE EFFECTS:
> +  *      This routine will normally modify the global statics CurArg, MaxArg,
> +  *  ArgvList, and CurWorkingDir.
> +  *
> +  *  NOTES:
> +  *      It is ok for &argc == pargc and &argv == pargv.
> +  *
> +  
> *----------------------------------------------------------------------------
> --
> +  */
> + void expand_wild (int argc, char **argv, int *pargc, char ***pargv) {
> +     int totfiles, filesgotten;
> +     int i;
> +     int largc;
> +     char **largv;
> +
> +     /* This first loop is to find out AT MOST how big to make the
> +      * pargv array.
> +      */
> +     for (totfiles=0,i=0;  i<argc;  ++i) {
> +         char *arg = argv[i];
> +
> +         if (   strchr(arg,' ') != 0 || strchr(arg,',') != 0
> +             || strcmp(arg,".") == 0 || strcmp(arg,"..") == 0) {
> +             ++totfiles;
> +         }else {
> +             int num = decc$from_vms (arg, ew_no_op, 1);
> +             totfiles += num>0 ? num : 1;
> +         }
> +     }
> +     if (totfiles) {
> +         largv = malloc (sizeof*largv * (totfiles + 1));
> +     }
> +     filesgotten = 0;
> +     if (largv != 0) {
> +         /* All bits set to zero may not be a NULL ptr */
> +         for (i=totfiles;  --i>=0;  ) {
> +             largv[i] = 0;
> +         }
> +         largv[totfiles] = 0;
> +
> +         wait_and_protect_globs ();
> +
> +         /*--- getcwd has an OpenVMS extension that allows us to ---*/
> +         /*--- get back Unix-style path names ---*/
> +         (void) getcwd (CurWorkingDir, sizeof CurWorkingDir, 0);
> +         if (CurWorkingDir[strlen(CurWorkingDir)-1] != '/') {
> +             (void) strcat (CurWorkingDir, "/");
> +         }
> +         CurArg = 0;
> +         ArgvList = largv;
> +         MaxArgs = totfiles + 1;
> +
> +         for (i=0;  i<argc;  ++i) {
> +             char *arg = argv[i];
> +             if (   strchr(arg,' ') != 0 || strchr(arg,',') != 0
> +                 || strcmp(arg,".") == 0 || strcmp(arg,"..") == 0) {
> +                 if (CurArg < MaxArgs) {
> +                     ArgvList[CurArg++] = strdup(arg);
> +                 }
> +                 ++filesgotten;
> +             }else if (*arg != '\0') {
> +                 int num = decc$from_vms (arg, ew_add_file, 1);
> +                 if (num <= 0 && CurArg < MaxArgs) {
> +                     ArgvList[CurArg++] = strdup(arg);
> +                 }
> +                 filesgotten += num>0 ? num : 1;
> +             }
> +         }
> +         if (filesgotten != totfiles) {
> +             /*--- Files must have been created/deleted here ---*/;
> +         }
> +         filesgotten = CurArg;
> +
> +         release_globs();
> +     }
> +     (*pargc) = largv ? filesgotten : 0;
> +     (*pargv) = largv;
> +
> +     return;
> + }
> +
> + #endif  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
> Index: vms/ndir.c
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/vms/ndir.c,v
> retrieving revision 1.1.1.1
> retrieving revision 1.2
> diff -c -r1.1.1.1 -r1.2
> *** vms/ndir.c  1999/03/01 23:55:46     1.1.1.1
> --- vms/ndir.c  2001/01/09 22:34:01     1.2
> ***************
> *** 17,22 ****
> --- 17,31 ----
>    * GNU General Public License for more details.
>    */
>
> + #ifndef __VMS_VER
> + #define __VMS_VER 0
> + #endif
> + #ifndef __DECC_VER
> + #define __DECC_VER 0
> + #endif
> +
> + #if __VMS_VER < 70200000 || __DECC_VER < 50700000
> +
>   #include <varargs.h>
>   #include <rms.h>
>   #include <descrip.h>
> ***************
> *** 303,305 ****
> --- 312,320 ----
>         return dp;
>       }
>   }
> +
> + #else  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
> +
> + #pragma message disable EMPTYFILE
> +
> + #endif  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
> Index: vms/pipe.c
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/vms/pipe.c,v
> retrieving revision 1.1.1.1
> retrieving revision 1.2
> diff -c -r1.1.1.1 -r1.2
> *** vms/pipe.c  1999/03/01 23:55:46     1.1.1.1
> --- vms/pipe.c  2001/01/09 22:34:02     1.2
> ***************
> *** 27,32 ****
> --- 27,41 ----
>    *    Added members to PIPE structure and memory corruption tests.
>    */
>
> + #ifndef __VMS_VER
> + #define __VMS_VER 0
> + #endif
> + #ifndef __DECC_VER
> + #define __DECC_VER 0
> + #endif
> +
> + #if __VMS_VER < 70200000 || __DECC_VER < 50700000
> +
>   /* This won't work with GCC, but it won't cause any problems either.  */
>   #define MODULE        PIPE
>   #define VERSION "V1.5"
> ***************
> *** 434,436 ****
> --- 443,449 ----
>       }
>   }
>   #endif
> +
> + #else  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
> + #pragma message disable EMPTYFILE
> + #endif  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
> Index: vms/pwd.c
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/vms/pwd.c,v
> retrieving revision 1.1.1.1
> retrieving revision 1.2
> diff -c -r1.1.1.1 -r1.2
> *** vms/pwd.c   1999/03/01 23:55:46     1.1.1.1
> --- vms/pwd.c   2001/01/09 22:34:02     1.2
> ***************
> *** 2,7 ****
> --- 2,16 ----
>   #include <stdio.h>
>   #include <unixlib.h>
>
> + #ifndef __VMS_VER
> + #define __VMS_VER 0
> + #endif
> + #ifndef __DECC_VER
> + #define __DECC_VER 0
> + #endif
> +
> + #if __VMS_VER < 70200000 || __DECC_VER < 50700000
> +
>   static struct passwd pw;
>
>   /* This is only called from one relevant place, lock.c.  In that context
> ***************
> *** 18,20 ****
> --- 27,33 ----
>     static char login[256];
>     return cuserid(login);
>   }
> +
> + #else  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
> + #pragma message disable EMPTYFILE
> + #endif  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
> Index: vms/pwd.h
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/vms/pwd.h,v
> retrieving revision 1.1.1.1
> retrieving revision 1.2
> diff -c -r1.1.1.1 -r1.2
> *** vms/pwd.h   1999/03/01 23:55:46     1.1.1.1
> --- vms/pwd.h   1999/03/02 17:42:16     1.2
> ***************
> *** 8,14 ****
> --- 8,18 ----
>      the group part of the UIC), so we are better off with higher-level
>      hooks like get_homedir and SYSTEM_GETCALLER.  */
>
> + #if !defined(__VMS_VER)
>   #define pid_t int
> + #elif __VMS_VER < 70000000
> + #define pid_t int
> + #endif
>
>   struct passwd {
>      char  *pw_name;
> Index: vms/rmdir.c
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/vms/rmdir.c,v
> retrieving revision 1.1.1.1
> retrieving revision 1.2
> diff -c -r1.1.1.1 -r1.2
> *** vms/rmdir.c 1999/03/01 23:55:46     1.1.1.1
> --- vms/rmdir.c 2001/01/09 22:34:03     1.2
> ***************
> *** 1,3 ****
> --- 1,13 ----
> +
> + #ifndef __VMS_VER
> + #define __VMS_VER 0
> + #endif
> + #ifndef __DECC_VER
> + #define __DECC_VER 0
> + #endif
> +
> + #if __VMS_VER < 70200000 || __DECC_VER < 50700000
> +
>   #include <stdio.h>
>   #include <unixio.h>
>
> ***************
> *** 8,10 ****
> --- 18,23 ----
>     return remove(path);
>   }
>
> + #else  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
> + #pragma message disable EMPTYFILE
> + #endif  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
> Index: vms/unlink.c
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/vms/unlink.c,v
> retrieving revision 1.1.1.1
> retrieving revision 1.3
> diff -c -r1.1.1.1 -r1.3
> *** vms/unlink.c        1999/03/01 23:55:46     1.1.1.1
> --- vms/unlink.c        2001/01/09 22:34:03     1.3
> ***************
> *** 2,8 ****
>
>   /* UNIX-like file deletion, deletes previous VMS file versions so UNIX
>      style locking through files dosen't lose.  */
> ! int unlink(char *path)
>   {
>     int rs, junk_rs;
>
> --- 2,14 ----
>
>   /* UNIX-like file deletion, deletes previous VMS file versions so UNIX
>      style locking through files dosen't lose.  */
> ! #ifndef __VMS_VER
> ! int vms_unlink(char *path)
> ! #elif __VMS_VER < 70200000
> ! int vms_unlink(char *path)
> ! #else
> ! int vms_unlink(char const*path)
> ! #endif
>   {
>     int rs, junk_rs;
>
> Index: vms/vms.h
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/vms/vms.h,v
> retrieving revision 1.1.1.1
> retrieving revision 1.3
> diff -c -r1.1.1.1 -r1.3
> *** vms/vms.h   1999/03/01 23:55:46     1.1.1.1
> --- vms/vms.h   2001/01/10 16:49:37     1.3
> ***************
> *** 1,6 ****
> --- 1,10 ----
>   /* Determined from CC RTL function prototypes in online documentation */
>
> + #if !defined(__VMS_VER)
>   #define mode_t unsigned int
> + #elif __VMS_VER < 70000000
> + #define mode_t unsigned int
> + #endif
>
>   #define fork(x) vfork(x)
>
> ***************
> *** 26,34 ****
>   #include "pwd.h"
>   #include "pipe.h"
>
> ! int unlink(char *path);
>   int link(char *from, char *to);
>
>   #define stat(a, b) wrapped_stat(a, b)
>
>   #undef POSIX
> --- 30,45 ----
>   #include "pwd.h"
>   #include "pipe.h"
>
> ! #if !defined(__VMS_VER)
> ! int vms_unlink(char *path);
> ! #elif __VMS_VER < 70000000
> ! int vms_unlink(char *path);
> ! #else
> ! int vms_unlink(char const*path);
> ! #endif
>   int link(char *from, char *to);
>
>   #define stat(a, b) wrapped_stat(a, b)
> + #define lstat stat
>
>   #undef POSIX
> Index: vms/waitpid.c
> ===================================================================
> RCS file: /CVS/IRM/tools/cvssrc/vms/waitpid.c,v
> retrieving revision 1.1.1.1
> retrieving revision 1.2
> diff -c -r1.1.1.1 -r1.2
> *** vms/waitpid.c       1999/03/01 23:55:46     1.1.1.1
> --- vms/waitpid.c       2001/01/09 22:34:03     1.2
> ***************
> *** 13,18 ****
> --- 13,27 ----
>   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>   GNU General Public License for more details.  */
>
> + #ifndef __VMS_VER
> + #define __VMS_VER 0
> + #endif
> + #ifndef __DECC_VER
> + #define __DECC_VER 0
> + #endif
> +
> + #if __VMS_VER < 70200000 || __DECC_VER < 50700000
> +
>   #include "vms.h"
>
>   #define WAITPID_CHILDREN 8
> ***************
> *** 62,64 ****
> --- 71,77 ----
>       *stat_loc = waited_status[i];
>     return p;
>   }
> +
> + #else  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
> + #pragma message disable EMPTYFILE
> + #endif  /*  __VMS_VER >= 70200000 && __DECC_VER >= 50700000  */
> cvs server: Diffing windows-nt
> cvs server: Diffing windows-nt/scc
> cvs server: Diffing zlib




reply via email to

[Prev in Thread] Current Thread [Next in Thread]