#1 Possible GCC 3.2 and GAUL's compatibility.h conflicts

closed-fixed
nobody
None
5
2003-02-25
2003-02-15
Anonymous
No

It seems that GCC 3.2 and GAUL disagree on a few definitions.

In line 163 of compatibility.h, the usleep function is declared to
return void, while /usr/include/unistd.h in line 383 declares it to
return int.

In line 239 of compatibility.h, the strndup is declared with n of type
int, while /usr/include/string.h declares n to be of type size_t

In line 274 of compatibility.h, the basename is declared to take
one parameter of type char *, while the same string.h declares it
to be of type const char *.

Once those three declarations are altered to match those from
standard include file GCC 3.2 has no trouble compiling and running
provided examples

Discussion

  • Stewart Adcock

    Stewart Adcock - 2003-02-25

    Logged In: YES
    user_id=162259

    Strange. I use GCC3.2 for much of my development work and
    GAUL compiles fine -- non of those definitions should be
    used since glibc defines those three functions itself.

    Nonetheless, I've changed the prototype for strndup(). BUT
    NOT usleep() or basename() -- I'm following the convention
    detailed in the man pages..

     
  • Stewart Adcock

    Stewart Adcock - 2003-02-25
    • status: open --> open-fixed
     
  • Stewart Adcock

    Stewart Adcock - 2003-02-25
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks