[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS 1.11.2 on OpenVMS
From: |
zinser |
Subject: |
CVS 1.11.2 on OpenVMS |
Date: |
Sun, 9 Jun 2002 16:33:53 +0200 |
Hello,
I have build CVS 1.11.2 on OpenVMS Alpha 7.3 with Compaq C V6.5. While doing
so the compiler emitted the following messages. Comments are indicated by
"--->" and a patch fixing the issues is appended below:
$ CC getdate.c
if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 59)
........^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression "Minutes" is bein
g compared with a relational operator to a constant whose value is not greater t
han zero. This might not be what you intended.
at line number 568 in file PUBLIC$ROOT:[UTIL.cvs.lib]getdate.y;1
if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 59)
.......................................^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression "Seconds" is bein
g compared with a relational operator to a constant whose value is not greater t
han zero. This might not be what you intended.
at line number 568 in file PUBLIC$ROOT:[UTIL.cvs.lib]getdate.y;1
if (Hours < 0 || Hours > 23)
............^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression "Hours" is being
compared with a relational operator to a constant whose value is not greater tha
n zero. This might not be what you intended.
at line number 572 in file PUBLIC$ROOT:[UTIL.cvs.lib]getdate.y;1
if (Year < 0)
........^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression "Year" is being c
ompared with a relational operator to a constant whose value is not greater than
zero. This might not be what you intended.
at line number 616 in file PUBLIC$ROOT:[UTIL.cvs.lib]getdate.y;1
if ((tod = ToSeconds(Hours, Minutes, Seconds, Meridian)) < 0)
........^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression "(tod=ToSeconds(.
..))" is being compared with a relational operator to a constant whose value is
not greater than zero. This might not be what you intended.
at line number 638 in file PUBLIC$ROOT:[UTIL.cvs.lib]getdate.y;1
now += 7 * SECSPERDAY * (DayOrdinal <= 0 ? DayOrdinal : DayOrdinal - 1);
.............................^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression "DayOrdinal" is b
eing compared with a relational operator to a constant whose value is not greate
r than zero. This might not be what you intended.
at line number 674 in file PUBLIC$ROOT:[UTIL.cvs.lib]getdate.y;1
if (Start < 0)
............^
%CC-I-QUESTCOMPARE, In this statement, the unsigned expression "Start" is being
compared with a relational operator to a constant whose value is not greater tha
n zero. This might not be what you intended.
at line number 958 in file PUBLIC$ROOT:[UTIL.cvs.lib]getdate.y;1
return Start == -1 ? 0 : Start;
...........^
%CC-I-QUESTCOMPARE1, In this statement, the unsigned expression "Start" is being
compared with an equality operator to a constant whose value is negative. This
might not be what you intended.
at line number 977 in file PUBLIC$ROOT:[UTIL.cvs.lib]getdate.y;1
---> These are all caused by the fact that the standard definition of time_t
on OpenVMS is unsigned, while other systems use signed. This can be easily
fixed by defining time_t inside of a #ifdef VMS in getdate.c/y
$ CC valloc.c
# include "getpagesize.h"
..^
%CC-F-NOINCLFILEF, Cannot find file "getpagesize.h" specified in #include direct
ive.
at line number 10 in file PUBLIC$ROOT:[UTIL.cvs.lib]valloc.c;1
---> This actually looks like a bug, since #ifndef HAVE_GETPAGESIZE
^
is not the test I would expect to see to decide to include getpagesize.h;-)
Another issue that I found is that there
is a name clash between the utime function provided in [.vms] for older versions
of OpenVMS and the (by now) C RTL function of the same name/purpose. To check
if utime is needed or not I provided configure-like logic in
[.vms]build_vms.com and re-wrote the script completely in the process to
include features like incremental compilation. Since this is a complete
rewrite I rather append the script below instead of providing a meaningless
diff. I most probably will provide similar updated scripts for the other
libraries over time, but this one was now most priority since the compile
actually produces an error ;-)
Greetings, Martin
*** lib/getdate.y.orig Wed May 8 22:31:13 2002
--- lib/getdate.y Wed May 8 22:44:13 2002
***************
*** 39,44 ****
--- 39,46 ----
Include <sys/time.h> if that will be used. */
#if defined(vms)
+ # define __TIME_T 1
+ typedef long int time_t;
# include <types.h>
#else /* defined(vms) */
# include <sys/types.h>
*** lib/getdate.c.orig Wed May 8 22:31:04 2002
--- lib/getdate.c Wed May 8 22:33:01 2002
***************
*** 60,65 ****
--- 60,67 ----
Include <sys/time.h> if that will be used. */
#if defined(vms)
+ # define __TIME_T 1
+ typedef long int time_t;
# include <types.h>
#else /* defined(vms) */
# include <sys/types.h>
*** lib/valloc.c.orig Wed May 8 22:30:57 2002
--- lib/valloc.c Wed May 8 22:32:58 2002
***************
*** 6,12 ****
#include "system.h"
! #ifndef HAVE_GETPAGESIZE
# include "getpagesize.h"
#endif
--- 6,12 ----
#include "system.h"
! #ifdef HAVE_GETPAGESIZE
# include "getpagesize.h"
#endif
$!------------------------------------------------------------------------------
$!
$! Build procedure for OpenVMS support library of CVS
$!
$! In case of problems you may contact Martin P.J. Zinser
$! zinser@decus.de (preferred) or zinser@sysdev.deutsche-boerse.com (work)
$!
$!------------------------------------------------------------------------------
$ SAVE_VERIFY= F$VERIFY(0)
$ true = 1
$ false = 0
$ tmpnam = "temp_" + f$getjpi("","pid")
$ tc = tmpnam + ".c"
$ all_cflags = "/DEBUG/NOOPTIMIZE/STANDARD=VAXC/DEFINE=HAVE_CONFIG_H" + -
"/INCLUDE_DIRECTORY=([-],[-.LIB],[-.SRC],[-.VMS])" + -
"/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES"
$!
$ if f$search("openvmslib.OLB") .eqs. ""
$ then
$ lib/create/log/object openvmslib.olb
$ endif
$!
$ write sys$output "Compiling OpenVMS support library for CVS"
$ gosub check_function
$ call make filesubr.obj "CC ''all_cflags' filesubr.c" filesubr.c
$ call make filutils.obj "CC ''all_cflags' filutils.c" filutils.c
$ call make getpass.obj "CC ''all_cflags' getpass.c" getpass.c
$ call make getwd.obj "CC ''all_cflags' getwd.c" getwd.c
$ call make misc.obj "CC ''all_cflags' misc.c" misc.c
$ call make ndir.obj "CC ''all_cflags' ndir.c" ndir.c
$ call make pipe.obj "CC ''all_cflags' pipe.c" pipe.c
$ call make piped_child.obj "CC ''all_cflags' piped_child.c"
piped_child.c
$ call make pwd.obj "CC ''all_cflags' pwd.c" pwd.c
$ call make rcmd.obj "CC ''all_cflags' rcmd.c" rcmd.c
$ call make readlink.obj "CC ''all_cflags' readlink.c" readlink.c
$ call make rmdir.obj "CC ''all_cflags' rmdir.c" rmdir.c
$ call make stat.obj "CC ''all_cflags' stat.c" stat.c
$ call make startserver.obj "CC ''all_cflags' startserver.c"
startserver.c
$ call make unlink.obj "CC ''all_cflags' unlink.c" unlink.c
$ call make vmsmunch.obj "CC ''all_cflags'/NOSTANDARD vmsmunch.c" vmsmunch.c
$ call make waitpid.obj "CC ''all_cflags' waitpid.c" waitpid.c
$ CALL MAKE openvmslib.OLB "LIBRARY/replace/log openvmslib.OLB *.OBJ" *.OBJ
$ if save_verify then set verify
$ exit
$!
$!------------------------------------------------------------------------------
$!
$! Check if a specific function needs to be implemented
$!
$CHECK_FUNCTION:
$!
$! utime...
$!
$ func = "utime"
$ hfile = ""
$ open/write tmpc 'tc
$ write tmpc "#include <types.h>"
$ write tmpc "#include <utime.h>"
$ write tmpc "int main(){"
$ write tmpc " const char *test;"
$ write tmpc " struct utimbuf t;"
$ write tmpc " test = ""Hello"";"
$ write tmpc " t.actime = 0;"
$ write tmpc " t.modtime =0;"
$ write tmpc " utime(test, &t);"
$ write tmpc "}"
$ close tmpc
$ gosub cc_prop_check
$ return
$!
$!------------------------------------------------------------------------------
$!
$! Check for properties of C/C++ compiler
$!
$CC_PROP_CHECK:
$ cc_prop = false
$ on error then continue
$ set message/nofac/noident/nosever/notext
$ cc 'all_cflags' 'tmpnam'
$ if $status then cc_prop = true
$ on error then exit
$ set message/fac/ident/sever/text
$ delete/nolog 'tmpnam'.*;*
$ if cc_prop
$ then
$ if (func .nes. "")
$ then
$ write sys$output "Function ''func' implemented in C RTL"
$ else
$ write sys$output "h-file ''hfile' part of C RTL"
$ endif
$ else
$ if (func .nes. "")
$ then
$ CALL MAKE 'func'.OBJ "CC ''all_cflags' ''func'.C" 'func'.C
$ lib/replace/log openvmslib.olb 'func'.obj
$ endif
$ if (hfile .nes. "") then copy 'hfile'.h_in 'hfile'.h
$ endif
$ return
$!------------------------------------------------------------------------------
$!
$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES
$ V = 'F$Verify(0)
$! P1 = What we are trying to make
$! P2 = Command to make it
$! P3 - P8 What it depends on
$
$ If F$Search(P1) .Eqs. "" Then Goto Makeit
$ Time = F$CvTime(F$File(P1,"RDT"))
$arg=3
$Loop:
$ Argument = P'arg
$ If Argument .Eqs. "" Then Goto Exit
$ El=0
$Loop2:
$ File = F$Element(El," ",Argument)
$ If File .Eqs. " " Then Goto Endl
$ AFile = ""
$Loop3:
$ OFile = AFile
$ AFile = F$Search(File)
$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
$ Goto Loop3
$NextEL:
$ El = El + 1
$ Goto Loop2
$EndL:
$ arg=arg+1
$ If arg .Le. 8 Then Goto Loop
$ Goto Exit
$
$Makeit:
$ Set Verify
$ 'P2
$ VV='F$Verify(0)
$Exit:
$ If V Then Set Verify
$ENDSUBROUTINE
Dr. Martin P.J. Zinser Email: zinser@decus.de
2512 Victor Avenue Phone: +1 312 523 6659
Glenview, IL, 60025 FAX: +1 312 408 3071
USA
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- CVS 1.11.2 on OpenVMS,
zinser <=