Menu

#73 jmp_buf declared wrongly

open
nobody
libc (8)
3
2002-09-26
2002-09-25
No

I came across two problems:

1. stdlib.h and string.h that come with prc-tools libc
both declare functions strtol and strtoul. According to
the C standard it should be only in stdlib.h. What's
worse, they have different prototypes and the compiler
complains if both headers are included.

2. In setjmp.h the jmp_buf is incorrectly typedef'd as
jmpbuf. Moreover, jmp_buf should not be a pointer
declaration; the functions should take a jmp_buf[1]
parameter instead.

Discussion

  • Anonymous

    Anonymous - 2002-09-25
    • priority: 5 --> 3
     
  • John Marshall

    John Marshall - 2002-09-26

    Logged In: YES
    user_id=4669

    The strtol/strtoul problems were fixed in CVS yesterday.

    I knew about the jmp_buf problems, but thanks for filing a
    bug about them so that they don't get forgotten.

    In general, these are yet more examples of "the (old) tiny
    libc is horribly broken". Thanks.

     
  • John Marshall

    John Marshall - 2002-09-26
    • summary: wrong headers --> jmp_buf declared wrongly
     

Log in to post a comment.