bug-bison
[Top][All Lists]
Advanced

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

Re: A few bugs on Bison 2.0 on prtetty old Sun OS 4.1.4


From: Peter Klein
Subject: Re: A few bugs on Bison 2.0 on prtetty old Sun OS 4.1.4
Date: Mon, 26 Sep 2005 20:36:30 +0200 (CEST)

Hi Paul,

my reply is missing since more than 3 month now!
SORRY, but I was a bit busy . . .


>
>Peter Klein <address@hidden> writes:
>
>> Alternatively you may stop SUN OS 4.1.4 support, which would be
>> a terrible bad solution for me!
>
>Thanks for your bug report.  Can you please explain why stopping SunOS
>4.1.4 support would be bad for you?  What applications are you running
>on SunOS 4.1.4 that require using Bison 2?

Well, I have a few self written X11 applications running on top of
that box. And I use everything which is arround and keep my gnu
environement up to date, as far as possible.

Clearly spoken, the old bison 1.875 (I guess) was working for
everything find.


>
>>>patch lib/hash.h:
>>>add #include include <stdlib.h> /* to get size_t */
>
>I assume it'd be OK to include <stddef.h> instead.  <stddef.h> also
>defines size_t, but it's smaller and less intrusive.
>
>
>>>/* 
>>>patch src/scan-gram.c: replace
>>>strtol -> strtoul
>
>SunOS 4.1.4 has strtoul but not strtol?  I thought that SunOS 4.1.4
>lacked both strtol and strtoul.  If so, why does this fix work for you?
>
enclosed I send you the man page for strtol (see attachement).

So this seams to work . . .
>
>
>>>#ifdef sunos4
>>>static char *
>>>private_strerror (int errnum)
>
>Instead of doing this, I'd rather leave the mainstream code alone, and
>add the gnulib strerror module (which implements strerror).
>
>http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/gnulib/gnulib/MODULES.html?r
ev=HEAD&content-type=text/html#module=strerror
>

The result seams to be the same!

If there is a modified code, please let me know!
I'll take it, and I'll try!

Most probably even faster than 3 month!

Thanx for your patience!

Peter Klein - from Germany
        #





























































Sun Release 4.1    Last change: 6 October 1987                  1






STRTOL(3)              C LIBRARY FUNCTIONS              STRTOL(3)



NAME
     strtol, atol, atoi - convert string to integer

SYNOPSIS
     long strtol(str, ptr, base)
     char *str, **ptr;
     int base;

     long atol(str)
     char *str;

     int atoi(str)
     char *str;

DESCRIPTION
     strtol() returns as a long integer the value represented  by
     the  character  string  pointed  to  by  _s_t_r.  The string is
     scanned up to the  first  character  inconsistent  with  the
     base.   Leading  ``white-space''  characters  (as defined by
     isspace() in ctype(3V)) are ignored.

     If the value of _p_t_r is not (char **)NULL, a pointer  to  the
     character  terminating  the scan is returned in the location
     pointed to by _p_t_r.  If no integer can be formed, that  loca-
     tion is set to _s_t_r, and zero is returned.

     If _b_a_s_e is positive (and not greater than 36), it is used as
     the  base  for  conversion.  After an optional leading sign,
     leading zeros are ignored, and ``0x'' or ``0X''  is  ignored
     if _b_a_s_e is 16.

     If _b_a_s_e is zero,  the  string  itself  determines  the  base
     thusly:  after an optional leading sign a leading zero indi-
     cates octal conversion, and a leading ``0x'' or ``0X'' hexa-
     decimal conversion.  Otherwise, decimal conversion is used.

     Truncation from long to int can, of course, take place  upon
     assignment or by an explicit cast.

     atol(_s_t_r) is equivalent to strtol(_s_t_r, (_c_h_a_r **)NULL, 
10).

     atoi(_s_t_r) is equivalent to (int) strtol(str, (char  **)NULL,
     10).

SEE ALSO
     ctype(3V), scanf(3V), strtod(3)

BUGS
     Overflow conditions are ignored.






Sun Release 4.1    Last change: 6 October 1987                  1




reply via email to

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