On 30 Mar 2000 [EMAIL PROTECTED] wrote:

> X-Authentication-Warning: roadrunner.sig.net: majordom set sender to 
>[EMAIL PROTECTED] using -f
> From: "T.E.Dickey" <[EMAIL PROTECTED]>
> Message-Id: <[EMAIL PROTECTED]>
> Subject: Re: lynx-dev Fixes for VMS Multinet TCPIP support + misc
> 
[...]
> It looked benign - so I'll probably put it in.  If you have a log of the
> build after that change, I'm curious to pick through the compiler warnings.
> 
        Not even the change looks begign but also agreed to be the best 
by the process.com team. Thanks !


> (I ironed out the few warnings I had with the UCX configuration, but did not
> see anything like that mktime warning - I assume it's due to a type
> redefinition in Multinet's headers).


        I think you did not read my posting carefully enough : let me 
cut-n-paste the relevant part again -->


|$ cc [-.Implementation]HTMIME.c
|
|        } else if (LYmktime(me->anchor->expires, FALSE) <= 0) {
|...................^
|%CC-I-QUESTCOMPARE, In this statement, the unsigned expression 
|"LYmktime(...)" i
|s being compared with a relational operator to a constant whose value is 
|not gre
|ater than zero.  This might not be what you intended.
|at line number 355 in file DISK:[JLAURET.APPS_DEV.LYNX2-8-3.WWW.LIBRARY.I
|MPLEMENTATION]HTMIME.C;1
 
        That's definitly part of the compilation "log". I'll spare you 
and the list the entire log report (it's a bit long and not informative).
This happens in 

./www/library/implementation/htmime.c    line  355
/src/LYcharutils.c                       line 2792


|
|        This is just a "I"  message (i.e. Informational) and just point on a
|potential problem in LYmktime compared to 0 with a <= 0. LYmktime is declared
|as "extern time_t", time_t declared in HTVMSUTILS.H -> HTUTILS.H -> TYPES.H ->
|DECC$TYPES.H as an "unsigned long int" so it is doubtfull that a negative value
|would be returned. This fix would be cosmetics-related and does not impact on
|run. Although, looking at the LYktime() function (in sc/luutils.c) it does not
|appear that the return value would have any chance to be negative (either 0 or
|a calculation of clock2 (line 6108) itself of time_t  type. Is this like so
|because some OS have time_t being something else than "unsigned" ? If this is
|the case, then a modification of the compilation option uder VMS would 
|have to be done ; otherwise, a code change is preferrable.

        In short : 

- Nothing to do with Multinet header
- Is in the provided DECC$TYPES.H
- Related to time_t == unsigned long
- DECC (at least for version V6.2-003) emmit a warning when an unsigned 
  int is compared with a <= 0 or < 0  instruction. Earlier version might not
  issue a "I" message but THIS DOES NOT MEAN that the code is 
  syntaxicly correct ; it just means that the compiler was not made aware of
  this potentially dangerous/faulty comparison.
  The message makes sens, how can an "unsigned long" be negative anyway ??

        Now that it should be clear to all of us that an unsigned long cannot 
be < 0, the real question now is :

- Is this because some OS have time_t <> 'unsigned' ?
    YES => VMS compiler option to suppress this warning
    NO  => patch the code 
        1) i.e. replace <= 0 by == 0
           'return (unsigned long) clock2;'   in this function (line 6108 
           in src/LYutils.c)
        2) recast LYmktime 
    


[...]
> perhaps slang does -- but if it does, it probably is hardcoded - a quick
> check of the source looks as if it might do _that_ (it ignores the SMG$
> definitions and assumes the whole world is a vt100).
>  
[...]
        Thanks for the tip. I'll try the Slang library and see what I can 
get out of it. I have it installed so that will be my week-end test.

> Thomas E. Dickey
> [EMAIL PROTECTED]
> http://www.clark.net/pub/dickey
> 

        I'll let you know how the slang goes ...


        
                  Jerome LAURET S.U.N.Y. @ Stony Brook
       ,,,,,      Dept. of Chemistry
      ( o o )     Stony Brook NY 11794-3400
  ---m---U---m---------------------------------------------
  E-mail: [EMAIL PROTECTED]
  URL   : http://nucwww.chem.sunysb.edu/jlauret/jlauret.html

Reply via email to