If the return codes for a program are reversed on vms, 
such that success = 1 and failure = 0, then cvs would
always exit with a failure on vms systems.  Attached
is a patch to fix this problem.

Thanks!

donald

ps.  Thanks Derek ;)


Index: lib/ChangeLog
===================================================================
RCS file: /home2/cvsroot/ccvs/lib/ChangeLog,v
retrieving revision 1.132
diff -u -r1.132 ChangeLog
--- lib/ChangeLog       2000/11/15 21:08:08     1.132
+++ lib/ChangeLog       2000/11/30 22:51:06
@@ -1,3 +1,7 @@
+2000-11-30  Donald Sharp <[EMAIL PROTECTED]
+
+       * system.h:  Added EXIT_SUCCESS
+
 2000-11-15  Derek Price  <[EMAIL PROTECTED]>
 
        * system.h:  Added CVS_FDOPEN to conform to CVS_FOPEN precedent
Index: lib/system.h
===================================================================
RCS file: /home2/cvsroot/ccvs/lib/system.h,v
retrieving revision 1.40
diff -u -r1.40 system.h
--- lib/system.h        2000/11/15 21:08:08     1.40
+++ lib/system.h        2000/11/30 22:51:07
@@ -326,6 +326,9 @@
 #ifndef EXIT_FAILURE
 #define EXIT_FAILURE 1
 #endif
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
+#endif
 
 /* check for POSIX signals */
 #if defined(HAVE_SIGACTION) && defined(HAVE_SIGPROCMASK)
Index: src/ChangeLog
===================================================================
RCS file: /home2/cvsroot/ccvs/src/ChangeLog,v
retrieving revision 1.1997
diff -u -r1.1997 ChangeLog
--- src/ChangeLog       2000/11/29 21:18:46     1.1997
+++ src/ChangeLog       2000/11/30 22:51:15
@@ -1,3 +1,7 @@
+2000-11-30  Donald Sharp <[EMAIL PROTECTED]>
+
+       * main.c: main would always exit with failure on vms
+
 2000-11-29  Derek Price  <[EMAIL PROTECTED]>
 
        * root.c (parse_cvsroot): back out yesterday's redundant changes
Index: src/main.c
===================================================================
RCS file: /home2/cvsroot/ccvs/src/main.c,v
retrieving revision 1.155
diff -u -r1.155 main.c
--- src/main.c  2000/11/29 21:18:46     1.155
+++ src/main.c  2000/11/30 22:51:15
@@ -1061,7 +1061,7 @@
 
     /* This is exit rather than return because apparently that keeps
        some tools which check for memory leaks happier.  */
-    exit (err ? EXIT_FAILURE : 0);
+    exit (err ? EXIT_FAILURE : EXIT_SUCCESS);
        /* Keep picky/stupid compilers (e.g. Visual C++ 5.0) happy.  */
        return 0;
 }

Reply via email to